from locale import atof, setlocale, LC_NUMERIC setlocale(LC_NUMERIC, 'hu_HU.UTF-8') num_str = '35,47' print(atof(num_str) * 2)