python line deduplicator