Create variables from strings in Python

前端 未结 2 567
心在旅途
心在旅途 2020-12-12 04:19

Is something like the following possible in Python:

>>> vars = {\'a\': 5}
>>> makevars(vars)
>>> print a
5

So, m

2条回答
提交回复
热议问题