1 2 3 4 5 6 7 8 9
def binary(n): s = str(n % 2) if n >> 1 > 0: s += binary(n >> 1) return s print binary(9)
1
1001