稍微變化一下用法,lambda 結合一行「for-loop」. 範例程式碼. test = lambda x: [i for i in range(x)] a = 10 for i in test(a): print(i). Python.
確定! 回上一頁