My Python Quiz

The ultimate place to learn Python!

Question #66: What gets printed?

class A:
    def __init__(self, a, b, c):
        self.x = a + b + c

a = A(1,2,3)
b = getattr(a, 'x')
setattr(a, 'x', b+1)
print a.x