Jackie
0
Q:

python to uppercase

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

>> "RANDOM STRING"
8
original = Hello, World!

#both of these work
upper = original.upper()
upper = upper(original)
4
message="hi"
print(message)
print(message.upper())
1
string.upper()
Parameters:
upper() does not take any parameters
Returns :
It converts the given string in into uppercase and returns the string.
2
>>> s = 'sdsd'
>>> s.upper()
'SDSD'
0

New to Communities?

Join the community