我试图在python中创建一个有意的无限循环。 程序的源代码是:
count = 0
while True:
count += 1
# end loop if count is greater than 10
if count > 10:
break
# skip 5
if count == 5:
continue
print count
raw_input("\n\nPress the enter key to exit.")
...但是当我尝试编译它时会出现以下错误消息:
there is an error in your program
SyntaxError: 'break' outside loop