String Formatting

  • + 0 comments

    Script kiddie here. I'm thinking that I could replace removeprefix with some sort of replace syntax. (giving credit to Anisha for a clean script)

    for a in range(number): #First we set up up a range w = len(format(number, 'b')) a=a+1 b = str(a) print(b.rjust(w), oct(a).removeprefix("0o").rjust(w),hex(a).removeprefix("0x").rjust(w).upper(),bin(a).removeprefix("0b").rjust(w))