Created
April 25, 2020 15:34
-
-
Save Deep18-03/83a7b26fd0f5cd81ebe6d7a503e96dc7 to your computer and use it in GitHub Desktop.
This file contains 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
#map,filter,reduce | |
#lets take map -we can provide any function to list using map | |
lst=["2","3","4","5","6","7","8"] | |
num=list(map(int,lst)) | |
print(num) | |
num1=list(map(lambda x:x*x,num)) | |
print(num1) | |
# def square(x): | |
# """This function take one value and perform sqare of that number""" | |
# return x*x | |
# def cube(x): | |
# """this function take onme value and perform cube of that number""" | |
# return(x*x*x) | |
# fun=[square,cube] | |
# for i in range(5): | |
# num2=list(map(lambda x:x[i],fun)) | |
# print(num2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment