Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
There is no need to transfer such shitty code to python.
Use setattr, hasattr and getattr if you can't.
There are several options, but stop here:
globals()['b'] = 2
print(b)
d = {}
d['b'] = b
print(d['b'])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question