The function doesn't do the comment says it does. The code to "Swap the bits." just turns the bits on. >>> def swap_bits(x): # Get the bit at position 6 and 17. bit6 = x & (1 << 6) bit17 = x & (1 << 17) # Swap the bits.…
The function doesn't do the comment says it does. The code to "Swap the bits." just turns the bits on. >>> def swap_bits(x): # Get the bit at position 6 and 17. bit6 = x & (1 << 6) bit17 = x & (1 << 17) # Swap the bits.…