The return statement only makes sense inside functions:
def foo():
while True:
return False
Use quit() in this context. break expects to be inside a loop, and return expects to be inside a function.
by James Palmer
The return statement only makes sense inside functions:
def foo():
while True:
return False
Use quit() in this context. break expects to be inside a loop, and return expects to be inside a function.