2

Can someone tell how Python 2 compares different data types. For instance -

a = [1,2]
b = {1,2}
c = (1,2)

a>b
#False
a>c
#False
c>b
#True

What is the basis of this comparison?

Pankhuri Agarwal
  • 764
  • 3
  • 23

0 Answers0