String Calculator (Python)