[Tutor] Truncate First Line of File

Tiger12506 keridee at jayco.net
Thu Feb 28 01:53:28 CET 2008


This is bill's method written out in code which is the python you seek, 
young warrior!

inname = 'inputfile'
outname = 'outfile'

infile = open(inname,'r')
outfile = open(outname,'w')
infile.readline()
line = infile.readline()
while line != "":
  outfile.write(line)
infile.close()
outfile.close()
os.rename(inname,outname) 



More information about the Tutor mailing list