Skip to main content

listools: a Python 3 package of list utilities

Project description

PyPI Build Python versions License Bug report

listools is a Python 3 package of which provides utility functions for dealing with lists in Python 3. listools supports Python version 3.5 and newer. You can install it using pip install listools.

This package contains four modules: flatools, iterz, listutils and llogic. The complete list of functions available is:

  • flatools.flatten_index(element, input_list)
  • flatools.flatten_join(*input_lists)
  • flatools.flatten_len(input_list)
  • flatools.flatten_max(input_list, *[, key, default])
  • flatools.flatten_min(input_list, *[, key, default])
  • flatools.flatten_mixed_type(input_list)
  • flatools.flatten_reverse(input_list)
  • flatools.flatten_single_type(input_list)
  • flatools.flatten_sorted(input_list, *[, key, reverse])
  • flatools.flatten_sum(input_list[, start])
  • flatools.flatten_zip_cycle(*input_lists)
  • flatools.flatten(input_list)
  • flatools.pflatten(input_list[, depth])
  • iterz.cycle_until_index(input_iter, i)
  • iterz.inf_cycle(input_iter)
  • iterz.iter_mask(input_iter, mask)
  • iterz.ncycles(input_iter, n)
  • iterz.zip_cycle(*input_iters)
  • iterz.zip_inf_cycle(*input_iters)
  • iterz.zip_longest(*input_iters[, default])
  • iterz.zip_syzygy(*input_iters)
  • listutils.list_lcm(input_list)
  • listutils.list_mask(input_list, mask)
  • listutils.list_mask_cycle(input_list, mask)
  • listutils.list_gcd(input_list)
  • listutils.period_len(input_list[, ignore_partial_cycles])
  • listutils.scrambled(input_list)
  • llogic.difference(list_1, list_2)
  • llogic.intersection(list_1, list_2)
  • llogic.is_ascending(input_list[, step])
  • llogic.is_contained(list_1, list_2)
  • llogic.is_descending(input_list[, step])
  • llogic.mixed_type(input_list)
  • llogic.single_type(input_list)
  • llogic.symmetric_difference(list_1, list_2)
  • llogic.union(list_1, list_2)

All functions have a __doc__ attribute with usage instructions.

Documentation is available at

A pdf version of the documentation is also available in the docs directory.

Bugs can be reported to

This library is published under the MIT License.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for listools, version 2.2.0
Filename, size File type Python version Upload date Hashes
Filename, size listools-2.2.0.tar.gz (14.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page