Set the K | function to set the kth bit ; kth bit of n is being set by this operation ; Driver code
def setKthBit ( n , k ) : NEW_LINE INDENT return ( ( 1 << k ) n ) NEW_LINE DEDENT n = 10 NEW_LINE k = 2 NEW_LINE print ( " Kth ▁ bit ▁ set ▁ number ▁ = ▁ " , setKthBit ( n , k ) ) NEW_LINE