Reading Through, Writing Around
class Counter:
count = 0
def increment(self):
self.count = self.count + 1
c1 = Counter()
c2 = Counter()
c1.increment()
c1.increment()
c2.increment()
print(c1.count, c2.count, Counter.count)
What is printed?
Sign in to answer questions and track your progress
Sign In