program 1:
print('{:-10}9'.format(12345))
print('{:-10}9'.format(8973955))
output of program 1:
123459
89739559
program 2:
print('{:10}9'.format(12345))
print('{:10}9'.format(8973955))
output of program 2:
123459
89739559
There is only one difference between the two programs. In the first program I used -10 for extra indentation. In the 2nd program I used 10 for extra indentation. Both -10 and 10 are giving indentation on the left side. But I want to do indentation on the right side so that I can produce output like this:
12345 9
8973955 9
How can I indent in the right side using Formatted String Literals