calculateur_inflation/smic.py
2024-12-03 14:59:19 +01:00

12 lines
339 B
Python

content: str
with open("smic.txt") as f:
content = f.read()
def get_smic_data() -> dict[str: float]:
smic_data: dict[str: float] = {}
for line in content.splitlines():
year, _, _, _, _, value = line.split(" ")
value = value.replace(",", ".")
smic_data.update({year: float(value)})
return smic_data