Aprende Funciones Lambda Construyendo un Rastreador de Gasto - Paso 4

Cuéntanos qué está pasando:

I tested with the dictionary
amount={‘amount’:‘amount’},
probe: amount={‘amount’:‘amount.append()’},
amount={‘amount’:amount.append()}, and also perform outside of the dictionary amount.append(), and the code still does not pass, I need someone to guide me.
Thank you

Tu código hasta el momento


# User Editable Region

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

# User Editable Region


expenses = []

Información de tu navegador:

El agente de usuario es: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Información del Desafío:

Aprende Funciones Lambda Construyendo un Rastreador de Gasto - Paso 4

pass your new dictionary to the .append() call.

To pass an argument to a function, it goes in the parentheses. There is an existing call to append() which has no arguments:

expenses.append(argument goes here)

So you will put the dictionary in place of “argument goes here”.

Keep in mind ‘amount’ is a string and amount is a variable containing a value.

The problem I have is that the dictionary does not work for me, at the expense of

No lo entiendo. ¿Puedes publicar el código actualizado?

expenses.append({dictionary goes here})