Basic String Methods
Basic String Methods
sentence = 'something'
sentence.upper() # Upercases the sentance variable
print(sentence) # even though the method .upper ran the string within the sentence variable is still lowercase
# To get that data working you need to assign it to a variable:
up_sen = sentence.upper
# Or re-assign it to itself
sentence = sentence.upper()Every time you see () we are working with a function or a method
() we are working with a function or a methodDifference between function and Method:
Some Types of methods:
Last updated