RE: python 读文件报错

You are viewing a single comment's thread from:

python 读文件报错

in python •  6 years ago 

这样写也行:

with open('C:/Users/tengy/Desktop/aaa.txt',encoding='UTF-8') as f:
    print(f.read())
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!