You are viewing a single comment's thread. Return to all comments →
m = 99 n = min(m, m - (m - number)) w = len(bin(n).removeprefix('0b')) for i in range(1, n + 1): print( str(int(i)).rjust(w), format(i, 'o').rjust(w), format(i, 'X').rjust(w), format(i, 'b').rjust(w) )
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 →