0

How does this code work?

a, b = 5, 6 c = (a, b) [a<b] print(c) output: 6

2nd Oct 2022, 2:36 PM
Shantanu
Shantanu - avatar
1 Resposta
+ 4
a<b is True int(True) returns 1 , index is type int. Automatically type casted. so (a, b) [a<b] => (a, b)[1] => 6
2nd Oct 2022, 2:52 PM
Jayakrishna 🇮🇳