As an example, if I have
f=10000000
print(f)
>>>1000000
but what I'm looking for is that instead of printing 1000000 I printed 1'000,000
I would like to know how I can get what I want.
Thanks
As an example, if I have
f=10000000
print(f)
>>>1000000
but what I'm looking for is that instead of printing 1000000 I printed 1'000,000
I would like to know how I can get what I want.
Thanks
One way to make the separation as you are looking for it is:
"{:,}".format(100000)
// Print '100,000'
This method will first request the separator identifier to be used in this case and then access the format method and the amount you want to apply the separator.