Articles → Python → Map function in python

Map function in python






Purpose





Example




mylist = [1,2,3,4,5]

def MyFunction(var):
    return var*2

print(list(map(MyFunction, mylist)))















Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, March 12, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250