介紹如何使用Python 的 map 函數搭配指定的函數逐一處理列表的每個元素。 ... 將map 物件轉為列表 result2 = list(map(square, [1, 2, 3, 4, 5])) print(result2)
確定! 回上一頁