How to fix SyntaxError: 'continue' not properly in loop in Python | DevErrors