counter
class justcount:
__secretcount=0
def count(self):
self.__secretcount+=1
print self.__secretcount
counter = justcount()
counter.count()
counter.count()
print counter.__secretCount
__secretcount=0
def count(self):
self.__secretcount+=1
print self.__secretcount
counter = justcount()
counter.count()
counter.count()
print counter.__secretCount
Comments
Post a Comment