Skip to main content

Mixes the elements of multiple lists in a balanced manner based on their proportional lengths.

pip install mixbalanced

Tested against Windows 10 / Python 3.10 / Anaconda

    

    This function takes multiple lists as input and returns a new list that contains the elements of the input lists.
    The elements are combined in a balanced manner based on their proportional lengths. Longer lists contribute more
    elements to the resulting list.

    Parameters:
        *args: Variable-length argument list, containing multiple lists/tuples.

    Returns:
        list: A new list containing the elements from the input lists/tuples mixed in a balanced manner.

    Example:
        from mixbalanced import mix_balanced
        l1 = ["Antonio"] * 10
        l2 = ["Paulo"] * 5
        l3 = ["Anna"] * 15
        l4 = ["Maria"] * 3
        mix = mix_balanced(l1, l2, l3, l4)
        print(mix)
        Output: ['Anna', 'Antonio', 'Anna', 'Antonio', 'Paulo', 'Anna', 'Anna', 'Antonio', 'Anna', 'Maria',
                 'Anna', 'Antonio', 'Paulo', 'Anna', 'Antonio', 'Anna', 'Antonio', 'Paulo', 'Anna', 'Anna',
                 'Maria', 'Antonio', 'Anna', 'Antonio', 'Paulo', 'Anna', 'Anna', 'Antonio', 'Anna', 'Antonio',
                 'Paulo', 'Anna', 'Maria']

Metadata

Release files for mixbalanced 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 mixbalanced 0.10
File Size Uploaded Provenance Actions
mixbalanced-0.10.tar.gz 3.1 kB Without provenance Details for mixbalanced-0.10.tar.gz

Built distribution (wheel)

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

Total release size: 7.4 kB

Release files / mixbalanced-0.10.tar.gz

Download URL mixbalanced-0.10.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2bf6c69964f9827de23ade6fb6417d805c9dfacbc2dcead200b4c219673c1f09
BLAKE2b-256 checksum
How to use checksums
4b79b58ad896f8dff19ea3eae47c8f417e5d577d720c14ca34e8a08a42a9e810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

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

Download URL mixbalanced-0.10-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
814d9f027e5f944910d07c8bf2d24a96632646bd8f317ded67a6d78b6b69ddb5
BLAKE2b-256 checksum
How to use checksums
39e68fb3cdece2ff56e9655005720b5bf6935e0bdcc51a273683a130d8c17f3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Security for mixbalanced 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