0

I have written these lines in python:

print({1, 2, 3} < {1, 3, 2})
print((1, 2, 3) < (1, 3, 2))

These gives output:

False
True

I could not understand the working of < operator for two sets and two tuples. Please explain.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • 1
    Welcome to Stack Overflow. What do you think the answer should be instead? Why? Did you try to find and read documentation about it? For example, you can try to put [`python set less than`](https://duckduckgo.com/?q=python+set+less+than) or [`python tuple less than`](https://duckduckgo.com/?q=python+tuple+less+than) into a search engine. – Karl Knechtel Jan 23 '22 at 15:51
  • Also, please keep in mind that you are supposed to ask one question at a time. – Karl Knechtel Jan 23 '22 at 15:54

0 Answers0