How to print the value that must be formatted to width of binary value of n

前端 未结 0 579
挽巷
挽巷 2021-01-25 13:55
def print_formatted(number):
    for i in range(1,number+1):
        a=oct(i)
        b=hex(i)
        c=bin(i)
        d=a.replace("0o","")
                 


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题