如何在Python中将字符串转换为大写?
当我尝试研究这个问题时,我发现了一些关于string.ascii_uppercase
的内容,但它无法解决问题:
>>> s = 'sdsd'
>>> s.ascii_uppercase
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute 'ascii_uppercase'
请参考如何在Python中将字符串转换为小写了解相反的操作。