The following five functions allow you to maintain the running balance of an account and print out lines relating to each transaction.
You'll also need a global variable (balance?) to maintain the running balance of the account.
def setBalance(amt): # Defines (but doesn't print) the value of the account balance
def printBalance(): # Displays current balance as a money value with a heading
def printLedgerLine(date, amount, details): # with items (and the balance) spaced and formatted
def deposit (date, details, amount): # Alter the balance and print ledger line.
setBalance(500)
printBalance()
withdraw("17-12-2012", "BP - petrol", 72.50)
withdraw("19-12-2012", "Countdown", 55.50)
withdraw("20-12-2012", "munchies", 1.99)
withdraw("22-12-2012", "Vodafone", 20)
deposit ("23-12-2012", "Income", 225)
withdraw("24-12-2012", "Presents", 99.02)
printBalance()