Use cmp() to compare lists : Compare List : List PYTHON TUTORIALS


PYTHON TUTORIALS » List » Compare List »

 

Use cmp() to compare lists


list1, list2 = [123'xyz'], [456'abc']
print cmp(list1, list2)
print cmp(list2, list1)
print list3 = list2 + [789]
print list3
print cmp(list2, list3)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo List
» Compare List