初学python 还很菜
你的路径写错了?
使用下面的格式读取。
with open(txt_path,'r') as f: lines=f.readlines() #读取全部行,或者你可以改成其他的读取方式 for line in lines: print(line)