Tell us what’s happening:
I am stuck it keeps telling me that there is an indentation error but idk how to solve it
Your code so far
def add_expense(expenses, amount, category):
expenses.append({'amount': amount, 'category': category})
def print_expenses(expenses):
for expense in expenses:
print(f'Amount: {expense["amount"]}, Category: {expense["category"]}')
# User Editable Region
def total_expenses(expenses):
return sum(map(lambda expense: expense['amount'], expenses))
# User Editable Region
return total
total = sum(map(get_amount, expenses))
return total
expenses = []
Your browser information:
User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1
Challenge Information:
Learn Lambda Functions by Building an Expense Tracker - Step 17