I need help with the below function:
def printLedgerLine(date, amount, details): # with items (and the balance) spaced and formatted

I have no idea what this function is supposed to do or how i could incorporated into my code. please help


My account balance function:
g_balance = 0


def setBalance(amount):
global g_balance
if amount:
g_balance = amount


def printBalance():
global g_balance
if g_balance:
printNow("%s $%0.2f" % ("Currrent balance is",g_balance))


def deposit (date, details, deposit):
global g_balance
g_balance = g_balance + deposit
printNow("%s %10s \t\t$%10.2f \t$%10.2f" % (date,details,deposit, g_balance))

def withdraw (date, details, withdraw):
global g_balance
g_balance = g_balance - withdraw
printNow("%s %10s \t\t$%10.2f \t\t$%10.2f" % (date,details,withdraw, g_balance))


The function i did above lets you set a balance and then it prints it, then you have the choice to either deposit or withdraw from that balance and then it prints the withdrawal/deposit amount and the amount after the balance has been altered. I dont know what the printLedgerLine is and how i could incorporated into my code.

Thanks