Which keywords can be used to define a function?
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
Keep exploring
Python quizzes
Sign Up Now
or Subscribe for future quizzes