You are viewing a single comment's thread. Return to all comments →
def print_formatted(number): width = len(f"{number:b}") for i in range(1,number+1): txt = str(i).rjust(width) + " " + f"{i: o}".rjust(width) + " " + f"{i:X}".rjust(width) + " " + f"{i:b}".rjust(width) print(txt)
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 →