0

can anyone explain this function in python

def print_formatted(n): width = len("{0:b}".format(n)) for i in range(1,n+1): print ("{0:{width}d} {0:{width}o} {0:{width}X} {0:{width}b}".format(i,width=width))

5th May 2020, 10:52 AM
Sujithra
1 Antwort
0
Hello Sujithra , Here I used your code and modify it for better understanding with doc string. Please go through it and raise any question if you have. https://code.sololearn.com/cIwER90kXjw5/?ref=app
5th May 2020, 7:22 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar