0

How the and function is working here?

I am unable to understand the working of and function here..Please help me understand. https://code.sololearn.com/cwdbQfU1u4xH/?ref=app

24th Jun 2020, 6:08 AM
Punit Kumar
Punit Kumar - avatar
9 Answers
+ 1
Yes it is not bitwise Bitwise operator in python is & And I have check It's print the second number always if the first number not equal to 0
24th Jun 2020, 6:31 AM
ycsvenom
ycsvenom - avatar
24th Jun 2020, 7:08 AM
Punit Kumar
Punit Kumar - avatar
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 But it is not a bitwise operator...bitwise will give output as 32 but it is giving output as 50
24th Jun 2020, 6:29 AM
Punit Kumar
Punit Kumar - avatar
0
YCS-Venom Yes exactly but do you know why?
24th Jun 2020, 6:33 AM
Punit Kumar
Punit Kumar - avatar
0
Punit Kumar i think the and keyword is return the second non zero value if the second value are not boolean
24th Jun 2020, 6:35 AM
ycsvenom
ycsvenom - avatar