0

what is the reason for below output

print(10 or 56) #10 print(56 or 10) #56 print (5 and 14) #14 print (14 and 5) #5

30th Mar 2020, 7:50 PM
Rohith Rajan
Rohith Rajan - avatar
1 Respuesta
+ 5
"or" and "and" don't return a boolean as many expect. Check this for complete answer: https://www.sololearn.com/discuss/2123294/?ref=app
30th Mar 2020, 7:57 PM
Kevin ★