1
0
mirror of https://github.com/Andre0512/pyhOn.git synced 2025-11-28 21:39:44 +02:00
Files
pyhOn/pyhon/helper.py

6 lines
159 B
Python
Raw Normal View History

2023-06-13 00:12:29 +02:00
def str_to_float(string: str | float) -> float:
try:
return int(string)
except ValueError:
return float(str(string).replace(",", "."))