Skip to main content

This module provides support to compare two lists that have same or different types of data in it.

Project description

This module provides support to compare two lists that have same or different types of data in it.
Examples
Open the ipython3 shell and import the modules
$ import listcompare as plc
$ lis1 = [1, 2 ,3]
$ lis2 = [2, 1]
$ plc.compare_list(lis1, dlis2) # Frue

$ lis1 = [1, 2, 3]
$ lis2 = [2, 1, '3']
$ plc.compare_list(lis1, lis2) # False

$ lis1 = ['1', '2', '3']
$ lis2 = ['2', '1']
$ plc.compare_list(lis1, lis2) # False

$ lis1 = [1, 2, 3]
$ lis2 = [2, 1, 3]
$ plc.compare_list(lis1, lis2) # True

$ lis1 = [{1: 1, 2: 2}]
$ lis2 = [{1: 1, 2: 2}]
$ plc.compare_list(lis1, lis2) # True

$ lis1 = 123
$ lis2 = [{1: 1, 2: 2}]
$ plc.compare_list(lis1, lis2) # Exception will be raised

$ lis1 = [1, 'a', {1: 1, 2: 2}, 3]
$ lis2 = [3, 1, {1: 1, 2: 2}, 'a']]
$ plc.compare_list(lis1, lis2) # True

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

listcompare-2.1.1.tar.gz (15.4 kB view details)

Uploaded Source

File details

Details for the file listcompare-2.1.1.tar.gz.

File metadata

  • Download URL: listcompare-2.1.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for listcompare-2.1.1.tar.gz
Algorithm Hash digest
SHA256 261bf4f939b96405fd7f5fa606be77cf8be2419d9e9f9cfb3614c13163be0a61
MD5 bc6402a60d1b7dc02e3981c4e842071b
BLAKE2b-256 8aa590f22254567e86af980becb899164c04f4e4d9ddc1ea7aef13a456b6ea9d

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