读取文件的时候报错:

Traceback (most recent call last):
File "D:\Python35\test\csdn.py", line 46, in <module>
with open("test.txt","r","utf-8") as f:
TypeError: an integer is required (got type str)

 改成如下就好了

 with open("test.txt","r+","utf-8") as f: 

 问题解决。

相关文章:

  • 2022-12-23
  • 2021-12-10
  • 2021-07-13
  • 2022-02-01
  • 2021-10-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
相关资源
相似解决方案