Jump to content

I'm trying to figure out how not to use globals, can't find any help.

You'll need to add parameters to your functions so they can accept input. You'll also likely need them to return values if they aren't already doing so.

 

Often classes help make things cleaner if you are accepting and/or returning multiple values because you aren't using lists/other Python types that hold multiple different types.

Link to comment
https://linustechtips.com/topic/333850-python-unboundlocalerror/#findComment-4529879
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×