You could use eval to evaluate the expression(s) read from your file...
...but depending on where said file comes from and to which extent you trust (or distrust) its contents, it may be a bad idea to do so. Safe might help with that, though I never used it myself.
The Monastery's search function also immediately turned up Evaluate Expressions., BTW, which may be relevant.
In reply to Re: converting from str to int
by AppleFritter
in thread converting from str to int
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |