1. Home
  2. Data Science
  3. Python
  4. What module can profile where a Python program spends time?

Added 25 Nov 2026

What module can profile where a Python program spends time?

  1. profiler_ext
  2. timeit only
  3. cProfile Correct answer
  4. debugpy

Correct answer

C. cProfile

5 views

MCQSEXAM

Explanation

cProfile reports function-level timing.

Reference

Asked in: Python Interview Advanced

https://docs.python.org/3/library/index.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