Last active
May 25, 2024 13:34
-
-
Save theSamyak/faf00b89690e9e0104833951de9f7026 to your computer and use it in GitHub Desktop.
[FCC First class functions and Closures Blog] Assigning Functions to Variables
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
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