Skip to main content

Diff 2 python lists using a given key

Project description

Overview

Diff 2 python lists using a given key

image

Usage

listA = [3, 2, 1]
listB = [5, 4, 3]
inA, inBoth, inB = DiffUnsortedLists(listA=listA, listB=listB, keyA=lambda x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]

listA = [1, 2, 3]
listB = [3, 4, 5]
resultB = DiffListsByKey(iterA=iter(listA), iterB=iter(listB), keyA=lambda x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]

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

listdiff-1.0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

listdiff-1.0.3-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file listdiff-1.0.3.tar.gz.

File metadata

  • Download URL: listdiff-1.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.18

File hashes

Hashes for listdiff-1.0.3.tar.gz
Algorithm Hash digest
SHA256 4020df1d168fabe119c0a8c4791fab85fe3e27f2861bce2f1e3bc5e088a5eb6f
MD5 0816e4b05969c60ab276ddc8fb5c83a1
BLAKE2b-256 5c14b6aaa4a48cedc0be4514d32c7ad71487453a831020053e68a42d66599cdc

See more details on using hashes here.

File details

Details for the file listdiff-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for listdiff-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8cc9001494968675008efca66a50bb9fe080f5e91ed5e0c90f70255f729e52e7
MD5 fa9fad92da6615ed8e847eb3aa448a2b
BLAKE2b-256 a64211776b10f4b5f08425f141c9d6c82d88d9cf2a9b67719f5700837d72cd2e

See more details on using hashes here.

Supported by

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