map function 1

This commit is contained in:
Mert Gör 🇹🇷 2023-06-01 13:36:05 +03:00
parent bf3dfe361c
commit 695b2fd6fc
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,7 @@
a = [1, 2, 3, 4, 5]
def foo(n):
return n * n
b = map(foo, a)
print(list(b))