如何纠正错误"语法错误:'继续'没有正确地循环#34;在python?

时间:2017-12-19 17:43:59

标签: python syntax-error

如何纠正错误"语法错误:'继续'没有正确循环 "在python?

matches = re.search("Temp =\s+([0-9.]+)", output)
 if ( not matches):
 time.sleep(0)
 continue

1 个答案:

答案 0 :(得分:1)

仅在continuefor循环中才允许

while。看起来这里多余了。如果这是循环的一部分,请同时发布您的代码部分。