Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 4

27 bytes added, 12:52, 20 June 2017
PART 1 - Strings and Substrings
print('Line 1' + '\n'*4 + 'Line 5\nLine 6')
</source>
:#Strings have tons of many built-in functions built into them and many more that we can use on them, to manipulate text. Let's take a look at the strings name space and the available functions:<source>
dir(course_name)
help(course_name)
</source>
:#Lets try out several different functions, refer . Refer back to the '''help() ''' function for more information, these are quick ways to view strings in different ways. Issue the following:<source>
course_name.lower() # Returns a string in lower-case letters
course_name.upper() # Returns a string in upper-case letters
13,420
edits