Skip to content

Instantly share code, notes, and snippets.

@pralabhsaxena05
Last active April 9, 2021 21:15
Show Gist options
  • Save pralabhsaxena05/abeec48983ac57cb7c5b8192d81ade8d to your computer and use it in GitHub Desktop.
Save pralabhsaxena05/abeec48983ac57cb7c5b8192d81ade8d to your computer and use it in GitHub Desktop.
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