Created
September 9, 2020 19:22
-
-
Save tamert/15bae8fdfb6fcda259d3d7e8f7d36bd8 to your computer and use it in GitHub Desktop.
4_map.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liste = [1,2,3,4] | |
def arttir(sayi): | |
return sayi *5+2 | |
print(list(map(arttir, liste))) | |
# out: [7, 12, 17, 22] | |
# yada lambda terimi ile kullanalım | |
print(list(map(lambda sayi: sayi *5+2, liste))) | |
# out: [7, 12, 17, 22] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment