You are viewing a single comment's thread. Return to all comments →
def print_formatted(number): for i in range (0,n): s=str(bin(n)[2:]) k=len(s) print(str(i+1).rjust(k),oct(i+1)[2:].rjust(k),hex(i+1).upper()[2:].rjust(k),bin(i+1)[2:].rjust(k))``
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 →