Skip to content

Instantly share code, notes, and snippets.

@ItsCosmas
Created May 7, 2019 10:13
Show Gist options
  • Save ItsCosmas/804d088306282f9c1566125f8e360ebb to your computer and use it in GitHub Desktop.
Save ItsCosmas/804d088306282f9c1566125f8e360ebb to your computer and use it in GitHub Desktop.
Lambda Functions
# Functions on the go, without assigning them to a variable
# Anonymous functions
def square(x):
return x*x
print(square(2))
print((lambda x: x*x)(4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment