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
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-1.1.11.tar.gz (15.0 kB view hashes)

Uploaded Source

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