SyntaxError:编译单个语句python时发现的多个语句
作者:互联网
这是我的代码,超级简单:
#borders of the bbox
longmax = 15.418483 #longitude top right
longmin = 4.953142 #longitude top left
latmax = 54.869808 #latitude top
latmin = 47.236219 #latitude bottom
#longitude
longstep = longmax - longmin
longstepx = longstep / 1000 #longitudal steps the model shall perfom
#latitude
latstep = latmax - longmin
latstepx = latstep / 1000 #latitudal steps the model shall perform
我尝试在Python IDLE(python 3.3)中运行它,并发生此错误消息
SyntaxError: multiple statements found while compiling a single statement
删除“#”它工作得很好.
怎么了?!
解决方法:
IDLE只能同时执行一个语句,即在您的情况下:单行.因此,您必须单独粘贴所有行并执行它们.
标签:python-idle,python 来源: https://codeday.me/bug/20191003/1850123.html