标签:encoding test utf8 type inf open 技术 enc odi
with open("test.text", "r",encoding='utf8') as f:
print(f.read())
输出:
with open("test.text", "r",encoding='utf8') as f:
# print(f.read())
for i in range(10):
print(f.readline())
输出:
with open("test.text", "r",encoding='utf8') as f:
print(f.readlines(), type(f.readlines()))
输出:
标签:encoding test utf8 type inf open 技术 enc odi
原文地址:https://www.cnblogs.com/bigox/p/11619297.html