Learn Lambda Functions by Building an Expense Traker - Step 2

Hello, I’m having problems listing empty spaces. My code so far:

def add_expense(expenses, amount, category):
    expenses = [ brakets, ]  <---  " list of  empty spaces "

To create an empty list you should have a pair of square brackets with nothing between them (not even any spaces).

1 Like

Thank you!
I had an indentation error as well.


I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like

Please don’t post the solution code, thanks!

It is great that you solved the challenge, but we are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.