Change floating-point .str() result #13720
Replies: 2 comments 6 replies
-
I agree with you, I aspect that the str method print the number in the correct format, so I would like a result |
Beta Was this translation helpful? Give feedback.
-
First of all, Second, the syntax above Third, the code outputs |
Beta Was this translation helpful? Give feedback.
-
Let's say we have something like this:
What I would expect:
3.0 + 4.4 = 7.4
or
3 + 4.4 = 7.4
What the result actually is:
3. + 4.4 = 7.4
I think that this is not a good way to do it. I get that by printing the decimal point, it is shown the number is a float, but it looks weird to just end with a dot. I'd much rather prefer that it shows just
3
, or if it has to be shown that it's a float, I'd prefer that it shows3.0
.Beta Was this translation helpful? Give feedback.
All reactions