[Tutor] Help converting strings to numbers

Charlie Clark Charlie@begeistert.org
Tue, 28 Aug 2001 11:36:25 +0200


Dear all,

I'm getting a whole set of values and putting them in a dictionary like 
this

{'preis': '2.029,00', 'marktpreis':'3.399,00'}

from which I need to generate a third price 'saving' which is ('preis' / 
'marktpreis') * 100 but I don't know how to convert the string prices to 
floats to do the maths - it's an invalid literal.

Please reply to me directly as I'm currently subscribed to the digest.

Thanx

Charlie