Write Python function to Clear the Rightmost Set Bit of a Number


Topic: Write Python function to Clear the Rightmost Set Bit of a Number

Solution

def clear_rightmost_set_bit(n):
    return n & (n - 1)
	
	
	



List all Python Programs