What does sys.getrefcount(obj) return in Python?
Correct answer
C. The number of references to the object
6 views
C. The number of references to the object
6 views
The count is one higher than expected because the argument itself is a reference.
Asked in: Python Interview Advanced Python
https://docs.python.org/3/library/index.htmlNot sure why the answer is C? Ask here and get an explanation.