Q20
Which keyword is used for function in Python language?
A.
Function
B.
def
AnswerC.
Fun
D.
Define
Answer: Option B
Solution
Answer: Option B
Solution:
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.