Can't we just check if the string has digits?
For example:

>>> x = '15'
>>> if x.isdigit():
        print int(x)*3

        
45
>>>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to