I havethe problem reported here -- but apparently solved in ipython
7.1.1, but I am using sage-9.2 with ipython 7.13.0 (as reported by
"sage -ipython").
https://stackoverflow.com/questions/52947493/ipython-how-to-continue-code-on-the-next-line
I start entering a loop like this
sage: for n in [1..10]:
....: m=2*n
where ipython automatically enters the continuation "....:" and
indentation, but after hitting return the second time, immediately
after the n in the second line, it evaluates what I have entered so
far (uselessly) and gives me a new Sage prompt.
I know that this seems to be an ipython issue, but there is no problem
if I use sage -ipython directly (using range() instead of [..]) *and*
no problem in Sage if instead I do "for n in range(10):" in the first
line. So this seems to be being caused by whatever Sage does to
convert [1..10] into python.
John