How do I convert arithemtic string (like "2+2") to a number?
Michael Hartl
mhartl at post.harvard.edu
Sat Feb 5 17:11:07 EST 2005
Previous message (by thread):
How do I convert arithemtic string (like "2+2") to a number?
Next message (by thread):
How do I convert arithemtic string (like "2+2") to a number?
Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Use the eval function: >>>
eval("30/(6+9)")
2 Michael
Previous message (by thread):
How do I convert arithemtic string (like "2+2") to a number?
Next message (by thread):
How do I convert arithemtic string (like "2+2") to a number?
Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-list mailing list