SyntaxError: 'return' outside function 问题求助

while search_deque:
    person = search_deque.popleft()
    if person not in searched:
        if person_is_seller(person):
            print(person + " is a mango seller!")
            return True
        else:
            search_deque += graph["person"]
            searched.appenr(person)

return False

C:\Users\lenovo\venv\Scripts\python.exe C:/Users/lenovo/Desktop/py/count10.py   File "C:/Users/lenovo/Desktop/py/count10.py", line 22     return True     ^ SyntaxError: 'return' outside function Process finished with exit code 1

你可能感兴趣的:(SyntaxError: 'return' outside function 问题求助)