Use the filter() function with a lambda function to select only the odd numbers.
# Define the lambda function
filter_odds = lambda nums: list(filter(lambda x: x % 2 != 0, nums))
# Test the function
print(filter_odds([1, 2, 3, 4, 5, 6, 7, 8, 9])) # Output: [1, 3, 5, 7, 9]
print(filter_odds([10, 15, 20, 25, 30])) # Output: [15, 25]
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.