Skip to main content

Package for grouping array objects in list by some key

Project description

A function that implements grouping of objects by some key. For example, the string 'AAAABBBCAAB' is given. The result of the program should be:[('A', ['A', 'A', 'A', 'A']), ('B', ['B', 'B'¸'B']), ('C', ['C']), ('A', ['A', 'A']), ('B', ['B'])]. It is also possible to use the function to determine the key for grouping. For example, for a list of tuples: [('foo', 1), ('bar', 1), ('foobar', 2), ('baz', 3)], when using the second element of the tuple as the key, the result should be [(1, [('foo', 1), ('bar', 1)]), (2, [('foobar', 2)]), (3, [('baz', 3)])].

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

grouping_list_tuple-1.0.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file grouping_list_tuple-1.0.tar.gz.

File metadata

  • Download URL: grouping_list_tuple-1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for grouping_list_tuple-1.0.tar.gz
Algorithm Hash digest
SHA256 25fdb18c72093a5e7452a532d09f725c6e8acd89140b3d4fcb9c6269bc5dc331
MD5 60a351bb68fe6f17b9b7ad0a5fc29f84
BLAKE2b-256 ad7f7bcd7b028f213f2fc23d154260909fdc10e67fc6ec8ce17375c51389bd2b

See more details on using hashes here.

Supported by

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