Metadata-Version: 2.1
Name: intersection-grouper
Version: 0.11
Summary: Groups lists by common intersections
Home-page: https://github.com/hansalemaos/intersection_grouper
Author: Johannes Fischer
Author-email: <aulasparticularesdealemaosp@gmail.com>
License: MIT
Keywords: group,intersections,lists
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Editors :: Text Processing
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Text Processing :: Indexing
Classifier: Topic :: Text Processing :: Filters
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE.rst


# Groups lists by common intersections



```python

pip install intersection-grouper

```





```python



from intersection_grouper import group_lists_with_intersections



listgroup = [

    [5, 3, 4, 5],

    [5, 11, 12, 3],

    [52, 34],

    [34, 111, 112],

    [1000, 300],

    [300, 5000],

]



x = group_lists_with_intersections(listgroup, keep_duplicates=True)

print(x)

[(34, 34, 52, 111, 112), (300, 300, 1000, 5000), (3, 3, 4, 5, 5, 5, 11, 12)]



x2 = group_lists_with_intersections(listgroup, keep_duplicates=False)

print(x2)

[(34, 52, 111, 112), (300, 1000, 5000), (3, 4, 5, 11, 12)]



```

