> > This is a working version in python: > > for line in f: > if line in seen_dict: > pass > else: > print line, > seen_dict[line] = 1 > why not use the following? for line in f: if line not in seen_dict: print line, seen_dict[line] = 1 that seems to say what you mean in a more succinct way.