another version of finding non duplicates from file in python