How can I write multi-line code in the python REPL? :
aircraftdeMacBook-Pro:~ ldl$ python
Python 2.7.10 (default, Jul 30 2016, 19:40:32)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
such as a sample example:
i = 0
while i < 10:
i += 1
print i
In the terminal I don't know hot to line feed in the python shell:
I tested the Control+Enter, and Shift+Enter, and Command+Enter, they all wrong:
>>> while i < 10:
... print i
File "<stdin>", line 2
print i
^
IndentationError: expected an indented block