KnowledgeBoat Logo

Computer Science

A function in Python begins with which keyword?

  1. void
  2. return
  3. int
  4. def

Python Functions

4 Likes

Answer

def

Reason — Functions in Python are defined as per the following format :

def function_name(parameters):
    statements

According to this format, function definition begins with keyword def.

Answered By

3 Likes


Related Questions