Skip to main content

Splits a list into sublists based on either a list of indices or a number of sections.

Tested against Windows / Python 3.11 / Anaconda

pip install splitlistatindex

from splitlistatindex import list_split
l1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
l2 = [3, 5, 7, 8, 12]

# Split `l1` using a list of indices
result1 = list_split(l=l1, indices_or_sections=l2)
# result1 will be: [[0, 1, 2], [3, 4], [5, 6], [7], [8, 9]]

# Split `l1` into 3 sections
result2 = list_split(l=l1, indices_or_sections=3)
# result2 will be: [[0, 1, 2, 3], [4, 5, 6], [7, 8, 9]]

Metadata

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

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / splitlistatindex-0.10.tar.gz

Download URL splitlistatindex-0.10.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9fdae4c6876ebf3389f45c5fba7aec91636ca8edaa35be5cc6ece96f77592dbf
BLAKE2b-256 checksum
How to use checksums
108e674288673ac52e5fc287a710bfe38896593778b48f62440d10d470329341
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL splitlistatindex-0.10-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcb918098a187452651eead61367b61f86adc8c04c1c16317ae0bda12d921957
BLAKE2b-256 checksum
How to use checksums
1af0a81c88442e4222d34efe6aec83dda78ccbd92188d875a8831bdd7728a2a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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