If the line number of the first line is 0 :

source=open('afile.txt')
for i,line in enumerate(source):
    if i == line_num:
        break
print line

Pierre

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to