Skip to main content

Finds intersections/differences in nested iterables

# Tested with:
# Python 3.9.13
# Windows 10


$pip install set-nested-iters


from set_nested_iters import (
    present_in_L1_and_L2,
    present_in_all_lists_reduce,
    unique_in_L1_and_L2,
    unique_in_each_list_reduce,
    present_only_in_L1,
    present_only_in_L1_reduce,
)
L0 = [{2, 5}, "a", 44, "jojjo", "xxx", {77: 100}]
L1 = [
    {2, 5},
    "a",
    ["bb", ["ccc", "ddd"], "ee", "ff"],
    "g",
    "h",
    "g",
    "h",
    3,
    4,
    5,
    0.0,
    1,
]
L2 = [
    {2, 5},
    "ac",
    (98, 11),
    ["bb", ["ccc", "ddd"], "ee", "ff"],
    "gc",
    "h",
    "gc",
    "h",
    11,
    2,
    3,
    1.0,
    0.0,
]
L3 = [
    {2, 5},
    "a",
    44,
    ["bb", ["ccc", "ddd"], "ee", "ff"],
    "g",
    "h",
    "g",
    "h",
    3,
    4,
    5,
    0.0,
    1,
]
L4 = [
    {2, 5},
    "ac",
    111112,
    (98, 11),
    ["bb", ["ccc", "ddd"], "ee", "ff"],
    "gc",
    "a",
    "h",
    "gc",
    "h",
    11,
    2,
    3,
    1.0,
    0.0,
]
erg0 = present_only_in_L1(L1, L2, withindex=False)
print(erg0)
erg1 = present_only_in_L1(L2, L1, withindex=False)
print(erg1)
erg2 = unique_in_L1_and_L2(L1, L2, withindex=False)
print(erg2)
erg3 = present_in_L1_and_L2(L1, L2, withindex=False)
print(erg3)
erg0 = present_only_in_L1(L1, L2, withindex=True)
print(erg0)
erg1 = present_only_in_L1(L2, L1, withindex=True)
print(erg1)
erg2 = unique_in_L1_and_L2(L1, L2, withindex=True)
print(erg2)
erg3 = present_in_L1_and_L2(L1, L2, withindex=True)
print(erg3)
print(present_in_all_lists_reduce(L1, [L2, L3, L4]))
print(unique_in_each_list_reduce(L1, [L2, L3, L4, L0]))
print(present_only_in_L1_reduce(L0, [L2, L3, L4, L1]))



['a', 'g', 4, 5]
['ac', (98, 11), 'gc', 11, 2]
['a', 'g', 4, 5, 'ac', (98, 11), 'gc', 11, 2]
[{2, 5}, ['bb', ['ccc', 'ddd'], 'ee', 'ff'], 'h', 3, 0.0, 1]
[(1, 'a'), (3, 'g'), (6, 4), (7, 5)]
[(1, 'ac'), (2, (98, 11)), (4, 'gc'), (6, 11), (7, 2)]
[(1, 'a'), (3, 'g'), (6, 4), (7, 5), (1, 'ac'), (2, (98, 11)), (4, 'gc'), (6, 11), (7, 2)]
[(0, {2, 5}), (2, ['bb', ['ccc', 'ddd'], 'ee', 'ff']), (4, 'h'), (5, 3), (8, 0.0), (9, 1)]
[{2, 5}, ['bb', ['ccc', 'ddd'], 'ee', 'ff'], 'h', 3, 0.0, 1]
[111112, {2, 5}, 'jojjo', 'xxx', {77: 100}]
['jojjo', 'xxx', {77: 100}]
	

Metadata

Release files for set-nested-iters 0.10

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

Source distribution (sdist)

Source distribution for set-nested-iters 0.10
File Size Uploaded Provenance Actions
set_nested_iters-0.10.tar.gz 4.1 kB Without provenance Details for set_nested_iters-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for set-nested-iters 0.10
File Interpreter ABI Platform Actions
set_nested_iters-0.10-py3-none-any.whl Python 3 none any Details for set_nested_iters-0.10-py3-none-any.whl

Total release size: 9.6 kB

Release files / set_nested_iters-0.10.tar.gz

Download URL set_nested_iters-0.10.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3a510d014bf392eba3a0d83bf5830894d86509e735a46dd18beadf0d5886fdac
BLAKE2b-256 checksum
How to use checksums
b9b0d84c6c62c1048a77f47f064199196fe2491adc4c51e62d6737b95bbe16c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / set_nested_iters-0.10-py3-none-any.whl

Download URL set_nested_iters-0.10-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f94665ee610450583dfac150a7bf92b8fd672f769b84a6a8e3d82662d7b55df
BLAKE2b-256 checksum
How to use checksums
75676d1fe9c9b958090a016092c81e0b457f2569f8a8ef73a55b327367295940
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for set-nested-iters 0.10

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.10 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