I can reproduce your problem. This is (arguably) a bug in ob-python when using the vanilla python interpreter together with the :session argument. You can work around it by putting a blank line after the for-loop in your second code block.
I say that it is arguable that this is a bug or not since you would have exactly the same error if you were to literally type your code block in at the python interactive prompt. That is, you have to give a second newline in order to close the loop and return to the top-level prompt. However, it is admittedly confusing to have different behavior with and without the ":session" argument.
Here is a minimal example that shows the problem.
* Test of ob-python in session mode with vanilla python interpreter
** FAILS: Without blank line after indented loop
#+BEGIN_SRC python :session *ob-python session*
for x in 1, 2:
pass
x
#+END_SRC
#+RESULTS:
An error message appears in the =*ob-python session*= buffer, which can be visited via =C-c C-v C-z= with point inside the code block.
#+BEGIN_EXAMPLE
>>> 'org_babel_python_eoe'
>>> 'org_babel_python_eoe'
>>> for x in 1, 2:
... pass
... x
File "<stdin>", line 3
x
^
SyntaxError: invalid syntax
#+END_EXAMPLE
** SUCCEEDS: With blank line after indented loop
#+BEGIN_SRC python :session *ob-python session*
for x in 1, 2:
pass
x
#+END_SRC
#+RESULTS:
: 2
** SUCCEEDS: Without using a session
#+BEGIN_SRC python :return x
for x in 1, 2:
pass
x
#+END_SRC
#+RESULTS:
: 2
** SUCCEEDS: Using ob-ipython instead of ob-python
#+BEGIN_SRC ipython :session
for x in 1, 2:
pass
x
#+END_SRC
#+RESULTS:
: 2