And removing the for loops in this case just displays the outfile with no text. Really stumped to what I am missing
import sys print(" *** Truncating File Copy ***") infile_name = input("Please enter the name of the file to copy: ") outfile_name = input("Please enter the name of the new copy: ") infile = open(infile_name, 'r+', errors = 'ignore') outfile = open(outfile_name, 'w+') newList = infile.readlines() def omit(): omitline = int(input("Omit how many lines from the start:")) newList[omitline:] def omit2(): omitline2 = int(input("Omit how many lines from the end:")) newList[:omitline2] omit() omit2() outfile.write(infile.read()) infile.close() outfile.close()