All challenges
Code AnalysisIntermediate 45s

Class Variable Shadowing

What is the output?
Starter code
class A:
    x = 1
a = A()
a.x = 2
print(A.x, a.x)

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle