From 61bd6e52c19150b1a6cbd94c3a0052115828dff4 Mon Sep 17 00:00:00 2001 From: Harry Percival Date: Sat, 20 Sep 2025 11:06:37 +0100 Subject: [PATCH] Update expected error message for incomplete if syntax this is the latest error message as of Python 3.10 (also 3.11, 3.12, 3.13) --- en/python_introduction/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/en/python_introduction/README.md b/en/python_introduction/README.md index e3798b6da3e..ede851594cc 100644 --- a/en/python_introduction/README.md +++ b/en/python_introduction/README.md @@ -658,9 +658,9 @@ If we were to save and run this, we'd see an error like this: {% filename %}{{ warning_icon }} command-line{% endfilename %} ``` $ python3 python_intro.py -File "python_intro.py", line 2 - ^ -SyntaxError: unexpected EOF while parsing +File "python_intro.py", line 1 + if 3 > 2: +IndentationError: expected an indented block after 'if' statement on line 1``` ``` Python expects us to give further instructions to it which are executed if the condition `3 > 2` turns out to be true (or `True` for that matter). Let’s try to make Python print “It works!”. Change your code in your **python_intro.py** file to this: