0 out of 464 challenges solved
Write a Python function `filter_odd_numbers(nums)` that takes a list of integers `nums` and returns a new list containing only the odd numbers from the input list. #### Example Usage ```python [main.nopy] print(filter_odd_numbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])) # Output: [1, 3, 5, 7, 9] print(filter_odd_numbers([10, 20, 45, 67, 84, 93])) # Output: [45, 67, 93] print(filter_odd_numbers([5, 7, 9, 8, 6, 4, 3])) # Output: [5, 7, 9, 3] ``` #### Requirements - Use Python's built-in `filter` function. - Use a lambda function to define the filtering condition.
def filter_odd_numbers(nums): """ Filters the odd numbers from a list of integers. Args: nums (list): A list of integers. Returns: list: A list containing only the odd integers from the input list. """ # Use the filter function with a lambda to filter odd numbers pass