Python: load variables in a dict into namespace
- by celil
I want to use a bunch of local variables defined in a function, outside of the function, so I am passing x=locals() as a return value.
How can I load all the variables defined in that dictionary into the namespace outside the function, so that instead of accessing the value using x['variable'], I could simply use variable.