0 out of 68 challenges solved

Split a string into a list

Question:
Write a function called generate_list that takes a sequence of comma-separated numbers as input and generates a list containing each number. The function should return the generated list.

Example:
Input: "34,67,55,33,12,98"
Output: ['34', '67', '55', '33', '12', '98']

def generate_list(values):
    """
    Generates a list containing each number from a sequence of comma-separated numbers.

    Args:
    values (str): The input sequence of comma-separated numbers.

    Returns:
    list: The generated list.
    """
    # TODO: Implement the generate_list function
    pass