Created
January 18, 2021 15:51
-
-
Save BetterProgramming/1cca99e8487a2c10ad744c3dff3c58d0 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
num=[1,2,3,4,5] | |
square=map(lambda x: x**2 , num) | |
print (square) | |
#Output: <map object at 0x0152E4D8> | |
print (list(square)) | |
#Output: [1, 4, 9, 16, 25] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment