In article <9t9hffh31mp.fsf at mraz.iskon.hr>, Hrvoje Niksic wrote: >> You may remove the test for line if you know that it is not empty. > >Or: > > if line[-1:] == '\n': > line = line[:-1] > >That works with both empty and non-empty lines. Why not just use string.strip()? -- KC5TJA/6, DM13, QRP-L #1447 Samuel A. Falvo II Oceanside, CA