Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在使用这个 python 3.3.0 代码时遇到问题。它给了我一个 EOL 错误。这是代码:
print('You own a'," ".join(profile['inventory'])
我没有尝试其他任何方法,因为我真的不知道 EOL 错误是什么。
运行代码时,您应该得到类似SyntaxError: unexpected EOF while parsing. 这是因为您忘记使用打印功能关闭括号。
SyntaxError: unexpected EOF while parsing
print('You own a'," ".join(profile['inventory'])) # Add an extra )