aboutsummaryrefslogtreecommitdiff
path: root/pyhon/helper.py
blob: 0cc3870e14ce942c00e8002facf7b92d477f7cf5 (plain) (blame)
1
2
3
4
5
def str_to_float(string: str | float) -> float:
    try:
        return int(string)
    except ValueError:
        return float(str(string).replace(",", "."))