Skip to content

Instantly share code, notes, and snippets.

@theSamyak
Last active May 25, 2024 13:34
Show Gist options
  • Save theSamyak/faf00b89690e9e0104833951de9f7026 to your computer and use it in GitHub Desktop.
Save theSamyak/faf00b89690e9e0104833951de9f7026 to your computer and use it in GitHub Desktop.
[FCC First class functions and Closures Blog] Assigning Functions to Variables
def add(a, b):
return a + b
result = add(3, 4)
print(add) # Prints the function object
print(result) # Prints 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment