Map Function in Python February 11, 2022 b=[0,1,2,3,4,5,6]def sq(a): return a*adef cube(a): return a*a*afun = [sq , cube]for i in b: val = list(map(lambda x:x(i) ,fun)) print(val) Share Get link Facebook X Pinterest Email Other Apps Share Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment