
As soon as I start typing on the new try block, I get that syntax error. If I put this code into a separate *.py and feed it into python via the command line:
python3 < chapter4.py
It works fine. Same indentation, same code. Is there something wrong I'm doing with IDLE?











