Find value of k | Python 3 program to find k - th bit from right ; Driver Code ; Function Call
def printKthBit ( n , k ) : NEW_LINE INDENT print ( ( n & ( 1 << ( k - 1 ) ) ) >> ( k - 1 ) ) NEW_LINE DEDENT n = 13 NEW_LINE k = 2 NEW_LINE printKthBit ( n , k ) NEW_LINE