Discuss / Python / 练习

练习

Topic source

Teresa委

#1 Created at ... [Delete] [Delete and Lock User]
fpath = r'D:/pythonTest/hello.txt'  # 加r是为了防止特殊字符的生效,将其转义

with open(fpath, 'r') as f:
    s = f.read()
    print(s)

Mayday阿立

#2 Created at ... [Delete] [Delete and Lock User]

你这不对吧!


  • 1

Reply