【发布时间】:2017-07-06 14:18:35
【问题描述】:
files = []
with open("[...].log", "a+") as posshell:
for line in files:
print(line)
posshell_files.append(line)
我不知道。它什么也不打印。数组为空。我试过抓取每个空字符并删除它们,以防它是 UTF16 -> 作为 UTF8 打开,没有用。
【问题讨论】:
-
如果你想读写使用
r+。 docs.python.org/3/tutorial/… -
请务必从您的问题中删除信息,人们已经花时间回答了。