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
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
Project details
Release history Release notifications | RSS feed
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.10.tar.gz
(14.8 kB
view hashes)
Built Distribution
Close
Hashes for listcompare-1.1.10-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d207e182a897b23479bad7e1a8f8eef76d5aa0b32e52ae341b1c3be3c1007823 |
|
MD5 | ae7930cd8d1a90b1a3f5fae7073355fc |
|
BLAKE2b-256 | d1d80437fee162f08e1204bde985a3e2318fc5df5e0a23e032db84a23eef8727 |