I found this line written in one of the solution I went through a solution
I don't know meaning of this line, is it a check for even/odd, please explain and if possible mention any link where this bitwise operators tricks and tips are given?? asked 24 Jun '14, 20:42

It is the shorthand notation of P=P>>1 . >> is the right shift operator . x>>y causes the binary representation of x to be shifted by the y digits to the right . In the example you asked it is dividing the number by 2 and assigning to the number back . For more information use : Right and Left Shift operator answered 24 Jun '14, 21:02
but if an assigning operation is done in if statement, wont it evaluate to true always ??
(24 Jun '14, 22:47)
Yes, till the number becomes zero..For e.g 60, 30, 15, 7, 3, 1, 0.
(24 Jun '14, 22:53)
It won`t be to true always , it will evaluate to the value of the variable . For example in this case after the assignment is done it will become , if (p) , and it be True if p is not zero and false otherwise .
(24 Jun '14, 23:04)
Here, it checks for the number to be anything other than 0 and 1.
(25 Jun '14, 06:32)
