Feb-18-2022, 01:49 PM
Hi , I need to convert "5,8" to a float = 5.8
Reading on this subject proposes 3 solutions
- Adapt the locale
- Do a replace (',','.') (if no 1000 separators)
- Regex...
I wonder if in the latest python releases something better has been proposed,
or what would be the preferred solution?
thx,
Paul
Reading on this subject proposes 3 solutions
- Adapt the locale
- Do a replace (',','.') (if no 1000 separators)
- Regex...
I wonder if in the latest python releases something better has been proposed,
or what would be the preferred solution?
thx,
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.