0 out of 464 challenges solved
Write a function `drop_empty` that takes a dictionary as input and returns a new dictionary with all key-value pairs where the value is `None` removed. #### Example Usage ```python [main.nopy] print(drop_empty({'c1': 'Red', 'c2': 'Green', 'c3': None})) # Output: {'c1': 'Red', 'c2': 'Green'} print(drop_empty({'c1': 'Red', 'c2': None, 'c3': None})) # Output: {'c1': 'Red'} print(drop_empty({'c1': None, 'c2': 'Green', 'c3': None})) # Output: {'c2': 'Green'} ```
def drop_empty(input_dict): """ Removes key-value pairs from the dictionary where the value is None. Args: input_dict (dict): The dictionary to process. Returns: dict: A new dictionary with None values removed. """ # Implement the function logic here pass