如何在Python中将字符串转换为变量名?
例如,如果程序包含一个名为self.post包含名为变量的对象,我想做类似的事情:
self.post
somefunction("self.post.id") = |Value of self.post.id|
python
python ×1