What is the sequence of operator while deriving the result of (x<y<z) if x=2, y=9 & z=10 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is the sequence of operator while deriving the result of (x<y<z) if x=2, y=9 & z=10

30th Aug 2019, 12:21 PM
Amit Saxena
Amit Saxena - avatar
4 Answers
+ 6
Python's comparison chains are evaluated left to right, as follows: (x<y<z) equals (x<y and y<z)
30th Aug 2019, 12:34 PM
HonFu
HonFu - avatar
+ 1
Ok there is and gate. Thank you
31st Aug 2019, 9:40 AM
Amit Saxena
Amit Saxena - avatar
0
2<9<9
1st Sep 2019, 4:00 AM
Abhinav Anand
Abhinav Anand - avatar
0
True
2nd Sep 2019, 8:16 AM
Mohammad Ahammad
Mohammad Ahammad - avatar