class variable: x = 1 y = 'a' z = True
dd = variable() print(hasattr(dd, 'x'))print(hasattr(dd, 'y'))print(hasattr(dd, 'z'))print(hasattr(dd, 'no'))
TrueTrueTrueFalse