Which keywords can be used to define a function in Python?
Explanation
def keyword is used to define a function:
def my_function():
 some code
lambda keyword is used to define so-called lambda functions (small one-time anonymous functions):
lambda x, y: x + y

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback