Danielle MurrayPython Development Techdegree Student 1,835 Points
I am having a problem understanding how to fix this error for my Basketball Team Stats Tool
I do not understand how to fix this error and i've tried fixing it but it does not seem to work. Please could someone help me.
This is the error message:
File "/home/treehouse/workspace/app.py", line 48
return panthers, bandits, warriors, team_lists
SyntaxError: 'return' outside function
Chris FreemanTreehouse Moderator 64,074 Points
return is outside a function, usually the issue is the
return statement needs to be indented further to the right.
This can also be caused by a preceding line also needed to be indebted to be inside a function. An insufficiently indented previous line will cause the parser to think the function code block has been “closed” thus making the subsequent
return outside of the function.
Post back if you need more help. Good luck!!!