Groups lists by common intersections
Project description
Groups lists by common intersections
pip install intersection-grouper
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)]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for intersection_grouper-0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8eb76770ef50f9129e740e6b93df5d3f6dbfbff67e69a1e54389b33be54748e |
|
MD5 | ab6fae829cbd9fa59839d69b2c35d82b |
|
BLAKE2b-256 | b822b536d2f982d52c0e46fd2f8642034e41b94f31006c337fd14c1ba83ac400 |
Close
Hashes for intersection_grouper-0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd40a217babc2e97ec06920d29416602d66e85bc6cbf43c26a7ee9983b404c7b |
|
MD5 | 9780003743a0f31b2431dc21f84bd11d |
|
BLAKE2b-256 | d1bd9ae8f756dbf90356a23685febffe71f5b14495fa9bdca2a1cdeaaeeaf639 |