📅  最后修改于: 2022-03-11 14:47:15.476000             🧑  作者: Mango
numbers = [1, 2, 3, 4, 5]
def square(num):
return num*num
squares = list(map(square, numbers))
print(squares)
# Output
# [1, 4, 9, 16, 25]