Python return statement error ” ‘return’ outside function”

The return statement only makes sense inside functions:

def foo():
    while True:
        return False

Leave a Comment

tech