title: How can I write multi-line code in the Terminal use python?
body: <p>How can I write multi-line code in the python REPL?  :</p>
  
  <pre><code>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.
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>such as a sample example:</p>
  
  <pre><code>i = 0
  
  while i &lt; 10:
      i += 1
      print i 
  </code></pre>
  
  <p>In the terminal I don't know hot to line feed in the python shell:</p>
  
  <p>I tested the <kbd>Control</kbd>+<kbd>Enter</kbd>, and <kbd>Shift</kbd>+<kbd>Enter</kbd>, and <kbd>Command</kbd>+<kbd>Enter</kbd>, they all wrong:</p>
  
  <pre><code>&gt;&gt;&gt; while i &lt; 10:
  ... print i 
    File "&lt;stdin&gt;", line 2
      print i 
          ^
  IndentationError: expected an indented block
  </code></pre>