def partition(rows, question):
    """
    Partitions a dataset.

    For each row in the dataset,
    check if it matches the question.
    If so, add it to 'true rows',
    otherwise, add it to 'false rows'.

    PARAMETERS
    ==========

    rows: list
        A list of lists to store the rows
        of the dataset to be partitioned.

    question: object
        Object of the class Question.

    RETURNS
    =======

    true_rows
        A list of lists that stores the rows
        for which the split question evaluates
        to true.

    false_rows
        A list of lists that stores the rows
        for which the split question evaluates
        to false.
    """
    true_rows, false_rows = [], []
    for row in rows:
        if question.match(row):
            true_rows.append(row)
        else:
            false_rows.append(row)
    return true_rows, false_rows