Last active
April 9, 2021 21:15
-
-
Save pralabhsaxena05/abeec48983ac57cb7c5b8192d81ade8d 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
def square(n): | |
return n * n | |
num_list = [1,2,3,4] | |
result = map(square, num_list) | |
print('Mapped result is: ', list(result)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment