0 out of 464 challenges solved
Write a function `flatten_to_set` that takes a list of lists (or tuples) of numbers and returns a set containing all unique numbers from the input. #### Example Usage ```python [main.nopy] flatten_to_set([(3, 4, 5), (4, 5, 7), (1, 4)]) # Output: {1, 3, 4, 5, 7} flatten_to_set([(1, 2, 3), (4, 2, 3), (7, 8)]) # Output: {1, 2, 3, 4, 7, 8} flatten_to_set([(7, 8, 9), (10, 11, 12), (10, 11)]) # Output: {7, 8, 9, 10, 11, 12} ```
def flatten_to_set(list_of_lists): """ Flattens a list of lists or tuples into a single set of unique numbers. Args: list_of_lists (list): A list containing lists or tuples of numbers. Returns: set: A set containing all unique numbers from the input. """ # Placeholder for the solution pass