Tom> Right now I get rid of this by just cutting off the last Tom> character. (a = l[:-1]). My problem is that sometimes the last Tom> line of the file has a \n and sometimes not. Try a = l.rstrip() instead. If there is significant whitespace at the end of lines, then a = l if l[-1:] == '\n': a = l[:-1] will work. Skip