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))
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