Skip to main content

Group duplicate values in a list with their index positions

Project description

groupdups

A simple Python package to group duplicate values in a list and return their index positions.

Installation

pip install groupdups

Usage

from groupdups import group_duplicates

arr = [2, 3, 2, 4, 3, 2]
print(group_duplicates(arr))
# Output: {2: [0, 2, 5], 3: [1, 4], 4: [3]}

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

groupdups-0.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

groupdups-0.1.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file groupdups-0.1.0.tar.gz.

File metadata

  • Download URL: groupdups-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for groupdups-0.1.0.tar.gz
Algorithm Hash digest
SHA256 87f05531398d9544bc90b1a81642330328a0d4929c91725346ab6633f6325047
MD5 8fd9e573b1aab79055a492a97b0360d4
BLAKE2b-256 74c500770a58b64927388105a7a0d14ae6c22a9898d8e25cce4634dde46dfb7f

See more details on using hashes here.

File details

Details for the file groupdups-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: groupdups-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for groupdups-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e2c52b9ea33017bc6516e00e88d3803caeb10a867d4ea490574d7391e2a2022
MD5 f5f9983f18954c5fe8b32125d893f75e
BLAKE2b-256 c291ef69f5adde7b8c71401fd3ff53b28be30ccf9bb5bfe46107fb143bae900d

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