2024-09-30 06:22:44 发布
网友
python版本:2.71
每当我试图用IDLE运行它时都会遇到语法错误。。。。在
horsemen = ["war", "famine", "pestilence", "death"] i = 0 while i < 4: print horsemen[i] i = i + 1
错误发生在骑手和等号之间
代码很好(语法上)。您的python环境一定有问题。还要确保它是正确的缩进。在
有什么原因不能使用for循环吗?在
for god in horsemen: print god
代码很好(语法上)。您的python环境一定有问题。还要确保它是正确的缩进。在
有什么原因不能使用for循环吗?在
相关问题 更多 >
编程相关推荐