Python 错误 SyntaxError:unexpected EOF while parsing

areaLst = []
countLst = []
f =  open('movies.txt','r',encoding= 'utf-8')
lst = f.readlines()
f.close() 
for item in lst:
    lst02 = item.split(' ')
    areaLst.append(lst02[0])
    countLst.append(eval(lst02[1]))

img

File后面的文件路径不要换行,写到一行就可以了。

在尝试转义时未定义的结尾。

看起来应该是最后一行的空格不对,建议先缩到上一行然后回车。