Reputation: 117
I would love to do something like this:
rates={'r1':10, 'r2':20}
and then do some cool command (what is it???) to end up with variables in my namespace
>>>r1 10 >>>r2 20
Is this a dumb idea?
Upvotes: 1
Views: 105
Reputation: 2076
You can just do:
globals().update(rates)
Anyway, it's usually a bad practice.
globals()
Upvotes: 2