Your question is Reverse Bits of Integer. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an unsigned 32-bit integer n, return the unsigned integer produced by reversing its bit order. Bit 0 becomes bit 31, bit 1 becomes bit 30, and so on. Implement a function that operates on exactly 32 bits.
def reverse_bits(n):