1. Home
  2. Data Science
  3. Python
  4. Where are compiled .pyc files stored in Python?

Added 25 Nov 2026

Where are compiled .pyc files stored in Python?

  1. In the system32 folder
  2. In the __pycache__ directory Correct answer
  3. In the Python install root only
  4. They are never stored

Correct answer

B. In the __pycache__ directory

MCQSEXAM

Explanation

Python caches bytecode in __pycache__ to speed up imports.

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 B? 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