Skip to main content

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)]

Metadata

Release files for intersection-grouper 0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for intersection-grouper 0.11
File Size Uploaded Provenance Actions
intersection_grouper-0.11.tar.gz 3.4 kB Without provenance Details for intersection_grouper-0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for intersection-grouper 0.11
File Interpreter ABI Platform Actions
intersection_grouper-0.11-py3-none-any.whl Python 3 none any Details for intersection_grouper-0.11-py3-none-any.whl

Total release size: 8.1 kB

Release files / intersection_grouper-0.11.tar.gz

Download URL intersection_grouper-0.11.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a8eb76770ef50f9129e740e6b93df5d3f6dbfbff67e69a1e54389b33be54748e
BLAKE2b-256 checksum
How to use checksums
b822b536d2f982d52c0e46fd2f8642034e41b94f31006c337fd14c1ba83ac400
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / intersection_grouper-0.11-py3-none-any.whl

Download URL intersection_grouper-0.11-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd40a217babc2e97ec06920d29416602d66e85bc6cbf43c26a7ee9983b404c7b
BLAKE2b-256 checksum
How to use checksums
d1bd9ae8f756dbf90356a23685febffe71f5b14495fa9bdca2a1cdeaaeeaf639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for intersection-grouper 0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.11 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page