def display_depenses(idbde, all, tot, bymonth=False):
"""Pretty-printing des résultats."""
month = "\tmois" if bymonth else ""
- print "Compte %s:\nannee%s\tgains\t\tdépenses" % (idbde, month)
+ print "Compte %s:\nannee%s\tdépenses\tgains" % (idbde, month)
for li in all:
if bymonth:
li = [int(li[0]), int(li[1]), li[2], li[3]]
else:
li = [int(li[0]), li[1], li[2]]
print "%s\t%s\t\t%s" % tuple(li)
- print "\nTotal :\n\tgains\t\tdépenses"
+ print "\nTotal :\n\tdépenses\tgains"
print "\t%s\t\t%s\n" % tuple(tot)
if __name__ == "__main__":