1. Home
  2. Data Science
  3. Python
  4. Which keyword is used to define a function in Python?

Added 25 Nov 2026

Which keyword is used to define a function in Python?

  1. func
  2. function
  3. def Correct answer
  4. define

Correct answer

C. def

10 views

MCQSEXAM

Explanation

Functions in Python are defined with the def keyword, followed by the name and parameters.

Reference

Asked in: Python Interview Basics

https://docs.python.org/3/tutorial/introduction.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs