import csvwith open('example.csv', 'a+') as f: writer = csv.writer(f) datas = [['name', 'age'], ['Bob', 14], ['Tom', 23], ['Jerry', '18']] writer.writerows(datas)