Python 列表[1,2,3,4,5],请使用map()函数输出[1,4,9,16,25] l = [1, 2, 3, 4, 5] def foo(i): return i*i n = map(foo, l) print(list(n)) 打印结果为 [1, 4, 9, 16, 25]