0
plz help me in understanding
what is the role of "%5.2f "in a code? of course, I know about ".2" means decimal point, i want to know the use of %5 before it?
3 Réponses
+ 3
5 stands for the total place
So for example
12.34 has a length of 5 (dot included)
If the number is smaller, e.g
1.23 (length of 4)
then the rest is filled with spaces to make it 5 long again in the output.
+ 4
Specify the language in Relevant Tags and try to search before you post.
https://www.sololearn.com/Discuss/1675729/?ref=app
https://www.sololearn.com/Discuss/1714248/?ref=app
https://www.sololearn.com/Discuss/1678161/?ref=app
0
Ty