Skip to content
Snippets Groups Projects
Select Git revision
  • 57b3564753503923d5b3e1af19b38c575fa57873
  • master default protected
2 results

find_duplicates.py

Blame
  • David Mareček's avatar
    David Mareček authored
    57b35647
    History
    find_duplicates.py 452 B
    #!/usr/bin/env python3
    import sys
    
    def find_duplicates(data_generator):
        """Find duplicates in the given data.
    
        The `data_generator` is an iterable over strings, so it can be
        iterated for example using a `for` cycle:
    
          for item in data_generator: ...
    
        It can be iterated multiple times.
    
        The goal is to return a list of duplicated entries, reporting each duplicated
        entry only once.
        """
    
        raise NotImplementedError()