Sep-10-2017, 12:17 PM
1 2 3 4 5 |
list1, list2 = [ 123 , 'xyz' ], [ 456 , 'abc' ] print cmp (list1, list2) print cmp (list2, list1) list3 = list2 + [ 786 ]; print cmp (list2, list3) |
File "C:/python/program/listcmp.py", line 6, in <module>
print (cmp(list1, list2))
NameError: name 'cmp' is not defined