import csv


def read_from_file(filename):
    """
    reads a csv file and returns a 2d list of the contents
    :param filename: name of csv file
    :return: 2d list[x][y] where x is a row and y is a column
    """

    csv_list = []
    try:
        csv_reader = csv.reader(filename, delimiter=',')
        for row in csv_reader:
            csv_list.append([col for col in row])
        return csv_list
    except IOError:
        print("Error: could not open {}".format(filename))