如何纠正错误;SyntaxError:';继续';“未正确进入循环”;用python?

如何纠正错误;SyntaxError:';继续';“未正确进入循环”;用python?,python,syntax-error,Python,Syntax Error,如何纠正循环中“SyntaxError:“continue”错误 “用python matches = re.search("Temp =\s+([0-9.]+)", output) if ( not matches): time.sleep(0) continue continue仅允许在for或while循环中使用。看起来这里是多余的。如果这是循环的一部分,请同时发布代码的该部分。无论发布的代码是否出现在循环中,缩进都已损坏。

如何纠正循环中“SyntaxError:“continue”错误 “用python

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

continue
仅允许在
for
while
循环中使用。看起来这里是多余的。如果这是循环的一部分,请同时发布代码的该部分。

无论发布的代码是否出现在循环中,缩进都已损坏。