You are viewing a single comment's thread. Return to all comments →
space = len(str(bin(number))[2:]) +1 for i in range(1, number+1): print(str(i).rjust(space-1), end='') print(str(oct(i))[2:].rjust(space), end='') print(str(hex(i))[2:].upper().rjust(space), end='') print(str(bin(i))[2:].rjust(space), end='') print('')
Seems like cookies are disabled on this browser, please enable them to open this website
String Formatting
You are viewing a single comment's thread. Return to all comments →