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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.