Skip to main content

Functions to work with list in python

Project description

PYLISTING

Functions to work with list in python

install

  • pip install pylistin

API

list_reduce <E, T>(list: list[E], callback: (ac: T, item: E, index: int, list: list[E]) -> T, ac_init: T) -> T

Move in for each all elements with a lamda function or def as callback for return a one result.

this function is used to loop through a list and accumulate a value.

from pylisting import list_reduce

list_reduce([2,5,9], lambda ac, item: ac + item, 0) # 

Project details


Download files

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

Source Distribution

pylistin-0.0.2.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylistin-0.0.2-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file pylistin-0.0.2.tar.gz.

File metadata

  • Download URL: pylistin-0.0.2.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.11

File hashes

Hashes for pylistin-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c5dfe19474afc81ce21eeacf8a831fbf3fb790bb7fbbe1ae3e7d3040bafed3da
MD5 e5b81de3fe2d0b091034eb7acf118850
BLAKE2b-256 8a70479c35a09b41772672f1c709f3c5092b7c0fa7ac8b574a1f70bccd041dc6

See more details on using hashes here.

File details

Details for the file pylistin-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pylistin-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.11

File hashes

Hashes for pylistin-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb1482ae8036f614304927fd66b458d9908915a46c27a78f3dde73a6729cdc17
MD5 bf4e3117033b3708f364adbc34bb4713
BLAKE2b-256 1122caca25a314e441c27d79a1a2fca79997009e56925279eb1b210e7ab577c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page