Compare two lists : Compare List « List « Python Tutorial






list1 = ['abc', 123]
list2 = ['xyz', 789]
list3 = ['abc', 123]
print 1ist1 < list2
print list2 < list3
print  list2 > list3 and list1 == list3








7.4.Compare List
7.4.1.Compare the nested list objects
7.4.2.Compare two lists
7.4.3.Use cmp() to compare lists