import csv
A = ('Max', 3, 'M'), ('bob', 5, 'M'), ('jane', 6, 'F')
with open('newfile.csv', 'wb') as result:
    writer = csv.writer(result, dialect='excel')
writer.writerows(A)
How to write a tuple of tuples to a CSV file using Python