python to uppercase

text = "Random String"
text = text.upper() #Can also do 
text = upper(text)


Here is what the above code is Doing:
1. We create a variable called text and assign it the string “Random String”
2. We call the upper() method on the text variable and assign the result to the text variable
3. We print the text variable

The result is that the text variable now contains the string “RANDOM STRING”

You can also use the lower() method to convert a string to lowercase.