?
Which keyword is used for function in Python language?
Answer & Solution
Correct Answer:
Option
B
In Python language, the keyword used for defining a function is def.
The "def" keyword is followed by the function name and a pair of parentheses that may contain parameters. This defines a function in Python. When you use the "def" keyword, you are indicating to Python that you are about to define a new function with the specified name and parameters. This keyword is essential for creating reusable blocks of code that can be called and executed multiple times throughout a program.
The "def" keyword is followed by the function name and a pair of parentheses that may contain parameters. This defines a function in Python. When you use the "def" keyword, you are indicating to Python that you are about to define a new function with the specified name and parameters. This keyword is essential for creating reusable blocks of code that can be called and executed multiple times throughout a program.
Join the Discussion
Login to post a comment or share your explanation.
Login