String Methods#
Examples:#
Method name |
Value |
---|---|
|
replace part of a string with another string |
|
a lowercased version of the string |
|
an uppercased version of the string |
|
a version with the first letter capitalized |
|
a version with the first letter of every word capitalized |
'Jonathan'.lower()
'jonathan'
'Temple is good'.replace('good','great')
'Temple is great'
temple = 'Temple is ok'
temple.replace('ok','great')
'Temple is great'
'Temple'+' is ok'
'Temple is ok'
'10' +' 2'
'10 2'
number = 1884 # Temple founding date
number += 150 # A way to add to value in variable number