Nat*_*ume 6 python object instance
我需要这方面的帮助.如何将字符串转换为变量/对象/实例名称,因为我不知道如何对其进行分类.
假设我的代码是:
a = {}
b = {}
class Test:
def getKeys(self, var):
return var.keys() #where var refers to the dictionary and its a string initially
Run Code Online (Sandbox Code Playgroud)