据此,sitehttps://www.askpython.com/python/syntax-error-eol-while-scanning-string-literal,EOL的具体意思是“到达“行尾”,而扫描是指到达字符串的最后一个字符,并且没有遇到结尾引号。”
但在这个例子中,引用在开始时丢失了,为什么它仍然发生? 范例
>>> print(hello')
File "<stdin>", line 1
print(hello')
^
SyntaxError: EOL while scanning string literal
您知道这行前面应该有一个
'
,但是Python没有Python标记器看到一个
'
,它以字符串文字开头。然后它看到一个)
,然后是行的末尾相关问题 更多 >
编程相关推荐