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
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
+ 1
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 Yes totally understood
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 But it is not a bitwise operator...bitwise will give output as 32 but it is giving output as 50
0
YCS-Venom Yes exactly but do you know why?
0
Punit Kumar i think the and keyword is return the second non zero value if the second value are not boolean