I don’t know what’s the problem.
i’ll appreciate if you could help me.
it seems like there are more spaces in my output than in the correct output(between “[47 chars]” and “900.00”, but i don’t know how to correct it. i’m sure it is a little issue.
Thank you.
Your code so far
def repr(self):
body = ‘’
head = self.category.center(30, ‘*’) + ‘\n’
for n in self.ledger:
body += n[‘description’][:23].ljust(23) + str(n[‘amount’]).rjust(7) + ‘\n’
total = 'Total: ’ + str(self.get_balance())
return head+body + total
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36
Challenge: Budget App
Link to the challenge: