Discuss / Python / 打卡

打卡

Topic source

°Destiny

#1 Created at ... [Delete] [Delete and Lock User]
fPath = 'D:\\info\\testRead.txt'with open(fPath, 'r', encoding='UTF-8') as f:
    s = f.read()
    print(f)
    print(s) 

with open(fPath, 'w', encoding='UTF-8') as f:
    f.write('今天是个好日子')

  • 1

Reply