human
How to swap two bits in a given integer ? | Python program for swapping given bits of a number.
left - shift 1 p1 and p2 times and using XOR.
Driver Code"
How can the above be solved in Python?

=====
Can you provide a code to how to swap two bits in a given integer?
assistant
#Here is code to how to swap two bits in a given integer .
 def swapBits ( n , p1 , p2 ) :
	n ^= 1 << p1
	n ^= 1 << p2
	return n
print ( " Result ▁ = " , swapBits ( 28 , 0 , 3 ) )