Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created September 14, 2020 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BetterProgramming/6f76bc24bd92b09782a0825710c70497 to your computer and use it in GitHub Desktop.
Save BetterProgramming/6f76bc24bd92b09782a0825710c70497 to your computer and use it in GitHub Desktop.
def square(x):
return x*x
num1=[1,2,3,4,5]
s=map(square,num1)
for i in s:
print (i)
'''
#Output:
1
4
9
16
25
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment