Validate String Using Python As A Calculator