I need to write the line numbers to an already existing text file in python 3. They have asked for the first 5 columns of the text file to contain a 4 digit line number foll
#!/usr/bin/python numberedfile = open("test.txt", "r") numberedlist = numberedfile.readline() i = 0 for lines in numberdlist: i = i+1 print str(i) + '\t' + lines numberdfile.close()