python - Error: 'List' object is not callable in map ...
https://stackoverflow.com/questions/4999874023.04.2018 · This error occurred because you previously used list object. Never call list () object, if you ever used list before. list = [1, 2, 3] # remove this list variable name and use any different one, then it will work. def powerof (num): return num**2 number = [1,2,3,4,5,6,7,8] s = list (map ( powerof , number)) print (s)
Error: 'List' object is not callable in map() function
https://www.thetopsites.net/article/54878405.shtmlNever call list() object, if you ever used list before. list = [1, 2, 3] # remove this list, then it will work. def powerof(num): return num**2 number = [1,2,3,4,5,6,7,8] s = list(map( powerof , number)) print(s)