【发布时间】:2014-07-26 07:31:57
【问题描述】:
所以我试图让这个 python 工作,但是当我运行它时,在“for space”之后出现语法错误。 我试过在那里放一个冒号,但即使它在那里,它仍然会说同样的错误。
with open("text.txt", "a") as save:
dot = '\n' + x + ' ' + ' ' + entry.get() #For new line empty spaces
for space
save.write(dot)
【问题讨论】:
-
你想达到什么目的?我认为您对
for和if感到困惑。 -
你想在这里做什么?以下是
for语句的外观:docs.python.org/2/tutorial/controlflow.html#for-statements
标签: python syntax-error