f.readline().rstrip('\n') should do it. If you are sure that lines
always end in '\n', then you could even use f.readline()[:-1]

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

Reply via email to