When it comes to float numbers, you can use format specifiers: ... the number with as many digits as Python calculates In [5]: f'{1.2345 + 3 ... ... <看更多>
There are four major ways to format strings in Python. ... <number of digits>f - Floating point numbers with a fixed amount of digits to the right of the ... ... <看更多>