Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mustafamuratcoskun
GitHub Repository: mustafamuratcoskun/Sifirdan-Ileri-Seviyeye-Python-Programlama
Path: blob/master/Pythondaki Gömülü Fonksiyonlar/Videolardaki Notebooklar/Map Fonksiyonu.ipynb
765 views
Kernel: Python 3
def double(x): return x * 2
map(double,[1,2,3,4,5,6,7])
<map at 0x753d07d358>
list(map(double,[1,2,3,4,5,6,7]))
[2, 4, 6, 8, 10, 12, 14]
list(map(lambda x : x ** 2,(1,2,3,4,5,6,7,8,9,10)))
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
liste1 = [1,2,3,4] liste2 = [5,6,7,8] liste3 = [9,10,11,12,13]
list(map(lambda x,y : x*y,liste1,liste2))
[5, 12, 21, 32]
list(map(lambda x,y,z : x * y * z,liste1,liste2,liste3))
[45, 120, 231, 384]