import csv


def write_csv(csv_list, filename):
    """
    writes a single csv file to the current directory
    :param csv_list: 2d list containing the csv contents
    :param filename: name of the newly created csv file
    :return: True if write successful, False if not
    """

    try:
        with open(filename, mode='w') as csv_file:
            csv_writer = csv.writer(csv_file, delimiter=',',
                                    quotechar='"', quoting=csv.QUOTE_MINIMAL)
            for row in csv_list:
                csv_writer.writerow([col for col in row])
        return True
    except IOError:
        print("Error: could not create {}".format(filename))
        return False