Examveda

Which keyword is used for function in Python language?

A. Function

B. def

C. Fun

D. Define

Answer: Option B

Solution (By Examveda Team)

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.

This Question Belongs to Python Program >> Introduction To Python

Join The Discussion

Related Questions on Introduction to Python