将map对象转换为list时报错'list' object is not callable?

问题描述:

代码如下:

def fun(x):
    return x ** 2
your_list = [1,2,3,4,5,6,7,8,9,10]

list(map(fun,your_list))

报错为:'list' object is not callable

没有问题啊 你这是全部代码了吗 运行不会有问题啊

python3 运行没有任何问题。楼主环境是什么?建议下次提问带上环境这些。