How to change a string into uppercase
Use str.upper()
:
>>> s = 'sdsd'
>>> s.upper()
'SDSD'
See String Methods.
To get upper case version of a string you can use str.upper
:
s = 'sdsd'
s.upper()
#=> 'SDSD'
On the other hand string.ascii_uppercase
is a string containing all ASCII letters in upper case:
import string
string.ascii_uppercase
#=> 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'