To keep track of all the accounts I type dir()
It's simple but I'm a beginner.
Code: Select all
class account:
def __init__(self):
self.all = []
def add(self, dollarval):
self.all.append(dollarval)
def show(self):
a=1
for transactions in self.all:
print a,\") $\", transactions
a+=1
def bal(self):
a=0
for transactions in self.all:
a=transactions+a
return a
def u(self):
del self.all[-1]