Reversing the binary of the given number in python

>>> a=int(input('Enter base 10 natural number: ')) Enter base 10 natural number: 42 >>> b = bin(a) >>> a = int(b[:2]+b[2:][::-1], 2) >>> a 21

सप्टेंबर 30, 2013 · 1 min · 25 words · शंतनू