1. Home
  2. Data Science
  3. Python
  4. What is a weak reference in Python?

Added 25 Nov 2026

What is a weak reference in Python?

  1. A temporary variable
  2. A private attribute
  3. A reference that does not prevent garbage collection Correct answer
  4. A copy of an object

Correct answer

C. A reference that does not prevent garbage collection

6 views

MCQSEXAM

Explanation

The weakref module lets caches avoid keeping objects alive.

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