map function 1
This commit is contained in:
parent
bf3dfe361c
commit
695b2fd6fc
7
python-temel/map.function.py
Normal file
7
python-temel/map.function.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
a = [1, 2, 3, 4, 5]
|
||||
|
||||
def foo(n):
|
||||
return n * n
|
||||
|
||||
b = map(foo, a)
|
||||
print(list(b))
|
Loading…
Reference in New Issue
Block a user