with open('test.csv', 'wb') as f:
    fileWriter = csv.writer(f, delimiter=',', quotechar='|', quoting=csv.
        QUOTE_MINIMAL)
for row in zip(*lol):
    fileWriter.writerow(row)
Python, transposing a list and writing to a CSV file