> def deposit(self, amount): > self.amount=amount > self.balance += amount > return self.balance > > > def withdraw(self, amount): > self.amount=amount > if(amount > self.balance): > return ("Amount greater than available balance.") > else: > self.balance -= amount > return self.balance
Also, this line is not needed in the deposit and withdraw methods: self.amount=amount -- https://mail.python.org/mailman/listinfo/python-list