def Counter(): count = 0 def inc(): count++ return count return incc1 = Counter()c2 = Counter()c1() # 1c1() # 2c1() # 3c2() # 1c2() # 2c1() # 4