I have a list of numbers that I want to print as follows:
1
1
3
11
58
451
4 461
49 957
598 102
7 437 910
94 944 685
Currently I achieve this by the following ugly code:
for count in counts:
s = str(count)[::-1]
s = ' '.join([s[i:i+3][::-1] for i in range(0,len(s),3)][::-1])
print('{:>11}'.format(s))
Is there anyway that format can achieve this immediately? I couldn't find anything in the documentation.