I have this string
s = "1,395,54"
I would like to remove the first comma to obtain the following string:
s = "1395,54"
What is the most efficient way to solve this simple problem?
You can use str.replace, it takes a third argument which specifies the number of occurrences to replace.
>>> your_str = "1,395,54"
>>> your_str.replace(",", "", 1)
'1395,54'