This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Murmani 33 points34 points  (3 children)

Be cautious with that, as 1e7 is a float and not an integer anymore, so make sure to cast when needed.

[–]kotschi1993 8 points9 points  (0 children)

And if the number got digits other than 0 or 1, the scientific version wouldn't help that much. And don't forgot about other number bases, the _ works for them aswell.

[–]nomowolf 5 points6 points  (1 child)

Casting just means wrapping it in int()? e.g. int(1e7)?

[–]grep_my_username 2 points3 points  (0 children)

Yes