Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythonrefcounting and cyclic GCSingle-choice MCQ

A fresh object is created and bound to one name. What does sys.getrefcount() return for it, and why?

import sys x = object() print(sys.getrefcount(x))