import csv


def parse_csv_data(csv_filename) -> list:  # Function to parse csv data into a list.
    """extracts CSV data and formats it as a list.

    :param csv_filename: the name of the CSV file you wish to parse.
    :return: the lines of the CSV as a list of lists.
    """
    file_lines = []  # initialises list to append to
    with open(csv_filename) as file:
        csv_reader = csv.reader(file, delimiter=",")  # .reader method helps organising file into a 2D array
        for line in csv_reader:  # each line is read and appended to the list
            file_lines.append(line)
    return file_lines