Classes
4 / 17
EasyOutput prediction

Shadowing a class variable with an instance variable

What does this code print?

class Config:
    debug = False

a = Config()
b = Config()
a.debug = True
print(a.debug, b.debug, Config.debug)

← → arrow keys to navigate

Sign in to save your progress.