-1

How do I rectify the error "SyntaxError: 'continue' not properly in loop " in python?

matches = re.search("Temp =\s+([0-9.]+)", output)
 if ( not matches):
 time.sleep(0)
 continue
chepner
  • 497,756
  • 71
  • 530
  • 681
  • 2
    Your indentation is broken, whether or not the posted code occurs in a loop. – chepner Dec 19 '17 at 17:50
  • Does this answer your question? [syntaxError: 'continue' not properly in loop](https://stackoverflow.com/questions/14312869/syntaxerror-continue-not-properly-in-loop) – Sören Jun 11 '22 at 09:42

1 Answers1

1

continue is allowed only in for or while loops. Looks like it's redundant here. In case this is part of a loop, please post that part of your code as well.

Mixhab
  • 421
  • 3
  • 14