In this video, we are going to learn what are the map() and filter() functions in Python programming language. Full PlayList : https://www.youtube.com/playlist?list=PL0zysOflRCel7fKZ_bBjlxA0XsHlbsv7P _______________________________________________________________________ Learn Python in One Video in Hindi: https://youtu.be/7GYHAJdHFbE Learn Core Java Basics : https://youtu.be/9yBlFPKiCdY Learn Servlet in Hindi: https://www.youtube.com/playlist?list=PL0zysOflRCel5BSXoslpfDawe8FyyOSZb Learn JDBC Programming : https://www.youtube.com/playlist?list=PL0zysOflRCenjuvOwumYLG9TCsEQZrV2M Learn c,java,python,kotlin basics : https://www.onlyjavatech.com/ TechSoft INDIA official website: https://www.techsoftindia.co.in/ Durgesh Tiwari Website : https://www.durgeshkumartiwari.com/ Follow me on Instagram: https://www.instagram.com/durgesh_k_t/
#map function example
# def fun1(x):
# return x * x
mylist = [213, 234, 346, 25]
mylist1 = [1, 2, 6, 7]
# #map
# ob = map(fun1, mylist)
# print(ob)
# print(list(ob))
# print(list(map(lambda x: x * x, mylist)))
newlist = list(map(lambda x, y: x + y, mylist, mylist1))
print(newlist)
Filter_Example.py
mylist = [23, 234523, 23425, 25252, 255, 44, 3, 9, 6, 567, 8]
#check x:EVEN
# def isEven(x):
# if x % 2 == 0:
# return True
# else:
# return False
ob = filter(lambda x: True if x % 2 == 0 else False, mylist)
print(list(ob))