🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

What will be the output of the following Python code?

>>>t1 = (1, 2, 4, 3)
>>>t2 = (1, 2, 3, 4)
>>>t1 < t2
A
True
B
False
C
Error
D
None
Explanation

The output will be (B) False.

Explanation:

  • Python compares tuples element by element.
  • In this case, t1 = (1, 2, 4, 3) and t2 = (1, 2, 3, 4).
  • Python first compares 1 with 1 (equal), then 2 with 2 (equal).
  • Next, it compares 4 (from t1) with 3 (from t2). Since 4 > 3, Python concludes t1 > t2.

So, the comparison t1 < t2 is False.

Correct Answer: B) False

Latest Updates