Decorating Hex function to pad zeros

前端 未结 6 1881
无人共我
无人共我 2020-11-29 01:31

I wrote this simple function:

def padded_hex(i, l):
    given_int = i
    given_len = l

    hex_result = hex(given_int)[2:] # remove \'0x\' from beginning o         


        
6条回答
提交回复
热议问题