with open(file_path, 'a') as outcsv:
    writer = csv.writer(outcsv, delimiter=',', quotechar='|', quoting=csv.
        QUOTE_MINIMAL, lineterminator='\n')
writer.writerow(['number', 'text', 'number'])
for item in list:
    writer.writerow([item[0], item[1], item[2]])
Writing a Python list of lists to a csv file