关于list is not callable
def count():
fs = []
for i in range(1,4):
def f(m = i):
return m ** 2
fs.append(f)
return fs
print count()()
这个程序运行为什么会显示
TypeError: 'list' object is not callable
难道是list不可以打印吗?
那为什么L=[1,2,3]
print L,打印出来的是[1,2,3]
def count():
fs = []
for i in range(1,4):
def f(m = i):
return m ** 2
fs.append(f)
return fs
print count()()
这个程序运行为什么会显示
TypeError: 'list' object is not callable
难道是list不可以打印吗?
那为什么L=[1,2,3]
print L,打印出来的是[1,2,3]
2017-08-01
举报