I have been trying to obtain certain lines of an input file, so I used the file "inputfile" for obtaining just the even lines.
f= open('inputfile.txt', 'r')
for i,line in enumerate(f):
if i%2==0:
print line
This way I obtain the lines printed, but, however, I do not know how to send these resulting lines to an output file, because when I initially tried to do it, I just obtained the first line. What can I do?