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.5.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

listdiff-1.0.5-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for listdiff-1.0.5.tar.gz
Algorithm Hash digest
SHA256 03be1022298574306f7bcd4c12aeac0b9a43db32179261b951207ea04aeb4fa9
MD5 e931620289ec6f4fdaf0fc31e8ae79c1
BLAKE2b-256 2567e1279d7e60dc8c8002e51a6d078199f6f1139e6dfdc487ce33ec3391b62f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: listdiff-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.19

File hashes

Hashes for listdiff-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 134cc955e926153376a3b6ae359e380c3f989f8a4990d1f7d5081e919bd296dc
MD5 6bb296acdf167678b27427384cafe659
BLAKE2b-256 3978b2899fb3108c8d9e225a7d8d95fb00f0a9359b526534dbfb9385fa822879

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