绝对路径
f = open('d:\345.txt',mode='r',encoding='utf-8') i = f.read() print(f) f.close()View Code
相对路径
f = open('345',mode='r',encoding='utf-8') i = f.read() print(f) f.close()View Code
2024-02-05 15:45:40
f = open('d:\345.txt',mode='r',encoding='utf-8') i = f.read() print(f) f.close()View Code
f = open('345',mode='r',encoding='utf-8') i = f.read() print(f) f.close()View Code
下一篇:345. 反转字符串中的元音字母