比如说,
test1 = {'1'='2'}
test2 = [test1]
如果我用test2(0)去试图读取test1,就会报错
TypeError: 'list' object is not callable
求解我要如何去读取这个test1呢?
注意是[],不是(),()是函数调用了~
>>> test1 = {'1':'2'} >>> test2 = [test1] >>> test2[0] {'1': '2'}
Sign in to make a reply
小Yang小生活
比如说,
test1 = {'1'='2'}
test2 = [test1]
如果我用test2(0)去试图读取test1,就会报错
TypeError: 'list' object is not callable
求解我要如何去读取这个test1呢?