MODIFYING STRING METHODS
a="Hey,Beautiful!"
#upper case
print(a.upper())
#lower case
print(a.lower())
a=" Hey,beautiful!"
#remove whitespace
print(a.strip())
a="hey,beautiful!"
#replace word
print(a.replace("hey","Hai"))
a="hey,beautiful!"
#split words
print(a.split(","))
OUTPUT:
HEY,BEAUTIFUL!
hey,beautiful!
Hey,beautiful!
Hai,beautiful!
['hey', 'beautiful!']