user:thomas gists created by user
user:thomas
title:mygist gists with given title
title:mygist
filename:myfile.txt gists having files with given name
filename:myfile.txt
extension:yml gists having files with given extension
extension:yml
language:go gists having files with given language
language:go
topic:homelab gists with given topic
topic:homelab
Login
Last active 10 months ago
這段 Python 程式碼使用 lambda 匿名函式 搭配 map() 函式,對 列表 numbers 中的每個數字進行倍數運算。lambda x: x * 2 定義了一個簡單的 匿名函式,然後透過 map(double, numbers) 讓列表中的每個數字都經過該函式處理,最終輸出 [2, 4, 6, 8, 10]。這種寫法適用於 資料轉換、函式式編程與簡化程式碼結構,提高可讀性與執行效率。
Embed
Embed this gist to your website.
Clone via HTTPS
Clone with Git using HTTP basic authentication.
Clone via SSH
Clone with Git using an SSH key.
Powered by Opengist ⋅ Load: 2ms⋅