Computer >> Computer tutorials >  >> Programming >> Python

How to convert lowercase letters in string to uppercase in Python?


You can use the upper() method in Python to convert all lowercase letters in string to uppercase. For example:

>>> 'HellO'.upper()
HELLO
>>> 'leaning tower of pisa'.upper()
'LEANING TOWER OF PISA'