您可以使用upper()Python中的方法将字符串中的所有小写字母都转换为大写。例如:
upper()
>>> 'HellO'.upper() HELLO >>> 'leaning tower of pisa'.upper() 'LEANING TOWER OF PISA'