Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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.

Files for listcompare, version 2.1.1
Filename, size File type Python version Upload date Hashes
Filename, size listcompare-2.1.1.tar.gz (15.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page