标签:pytho col pre code open nbsp 读写 读取 pen
1、读
1 f = read(‘$filePath‘, ‘r‘) 2 line = f.readline() #读取一行 3 lines = f.readlines() #读取所有行
2、写
1 with open(‘$filePath‘, ‘w‘) as fw: 2 fw.write(sth)
标签:pytho col pre code open nbsp 读写 读取 pen
原文地址:https://www.cnblogs.com/lxc1910/p/11626650.html