Skip to content
Advertisement

Python comma and divide an integer

JavaScript

Example output is: 8993 / 18782

I see some questions like that, but all of them was about “float”.

I want to make these integers like that:

8,9K / 18,7K

What is the “proper” way to do that?

Advertisement

Answer

Try this function:

JavaScript

And replace your final line of code with the function:

JavaScript

Also, if you don’t want to add a new function you could just do:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement