Skip to main content

# listools

This library provides utility functions for dealing with lists in Python 3. listools supports Python version 3.0 and newer. It is contained in a single Python file, so it can be easily copied into your project (the copyright and license notice must be retained). Alternatively, to install it using pip, use the command below:

pip install listools

Note that you might need to use pip3 instead of pip.

Bugs can be reported to https://github.com/gilbertohasnofb/listools. The code can also be found there.

This library contains the following functions:

  • listools.flatten(input_list)

  • listools.partial_flatten(input_list[, depth])

  • listools.concat_flatten(*input_lists)

  • listools.sum_flatten(input_list)

  • listools.len_flatten(input_list)

  • listools.index_flatten(element, input_list)

  • listools.zip_cycle(*input_iters)

  • listools.zip_cycle_flatten(*input_lists)

All functions have a __doc__ attribute with usage instructions.

This library is published under the MIT License.

Metadata

Release files for listools 1.0.1

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

Source distribution (sdist)

Source distribution for listools 1.0.1
File Size Uploaded Provenance Actions
listools-1.0.1.tar.gz 4.3 kB Without provenance Details for listools-1.0.1.tar.gz

Release files / listools-1.0.1.tar.gz

Download URL listools-1.0.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e953b7e1ad7e0802dd0f26c1c499115316cef7f86dfed7d31ec4d6787bb6a683
BLAKE2b-256 checksum
How to use checksums
729449b7c5f455f3dcf97be6cccf8ec61fb4757c1fdd6e683f1c79fba387e39a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Security for listools 1.0.1

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.

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