#!/usr/bin/python# -*- coding: UTF-8 -*-import csvwith open('file.csv','a',newline='') as csvfile: spamwriter = csv.writer(csvfile, dialect='excel') with open('data_2016_1.txt', 'rb') as filein: for line in filein: line_list = line.decode().split('\t…