Assuming that the OP does not want leading spaces, specifying the ":8" in the str() instruction is not good as a general advice. When there are not enough digits in the input number spaces will be added to the left until the output string has a length of at least 8 characters this way. To avoid this, indendent of the input value, it is better to use the width parameter 0 for the general case:
Hi!
This is not true.
If there are not enough formating space - here 8 - then
str takes all needed digits for the integer part. The formatting of the frac part - here 4 - is respectecd.
The logic goes this way:
If there are too many total digits then the missing digits are filled up with leading spaces.
This way you can arrange a formatted output for a table.
This is not true, if there are not enough totaldigits. then the string is enlarge to the left.
The frac part is allways respected.
Winni