我有一个问题,使用Python将字符串改为大写。在我的研究中,我得到了string.ascii_uppercase但不起作用。
以下代码:
>>s = 'sdsd'
>>s.ascii_uppercase
给出这个错误信息:
Traceback (most recent call last):
File "<console>", line 1, in <module>
AttributeError: 'str' object has no attribute 'ascii_uppercase'
我的问题是:我怎样才能在Python中将字符串转换为大写?
相似问题