def get_text():
with open("hamlet.txt","r",encoding='utf-8') as txt:
#把所有字母转换成小写字母
txt = txt.lower()
报错AttributeError: ‘_io.TextIOWrapper‘ object has no attribute ‘lower‘
最新推荐文章于 2024-03-29 10:59:51 发布
def get_text():
with open("hamlet.txt","r",encoding='utf-8') as txt:
#把所有字母转换成小写字母
txt = txt.lower()