Learn Lambda Functions by Building an Expense Tracker - Step 20

Tell us what’s happening:

Describe your issue in detail here.

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"]}')
    
def total_expenses(expenses):
    return sum(map(lambda expense: expense['amount'], expenses))
    

# User Editable Region

def filter_expenses_by_category(expenses, category):
    return lambda expense: expense['category']) == category

# 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/120.0.0.0 Safari/537.36

Challenge Information:

Learn Lambda Functions by Building an Expense Tracker - Step 20

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Welcome to the forum @victorsalekb

Please remove the round bracket appearing before the equality comparsion.
You do not need the return keyword in your code.

Happy coding

Why do you not need the return keyword in this one?