Learn Lambda Functions by Building an Expense Tracker - Step 15

Tell us what’s happening:

I do not KNOW how to do this and am confused about what names to use in the looping thing.

Your code so far

def add_expense(expenses, amount, category):
    expenses.append({'amount': amount, 'category': category})
    

# User Editable Region

def print_expenses(expenses):
    for  in range( ):
        pass

# User Editable Region


expenses = []

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36

Challenge Information:

Learn Lambda Functions by Building an Expense Tracker - Step 15

Hi @1302200651

Inside the print_expenses function, create a for loop that iterates over each item in the expenses list. Use expense as the loop variable and move pass inside the loop body.

For this step you need to create a for loop that iterates over expenses using expense as a variable.

You can search online for the loop structure.

Happy coding

I am having issues too, can someone please explain this in more detail?

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Get Help > Ask for Help button located on the challenge.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.