title: Indentation error on Visual Studio Code on a Mac (again)
body: <p>I am a newbie trying to use Python (2.17.15 via Anaconda) on <strong>Visual Stodio Code</strong> on my Mac. I have the following simple code:</p>
  
  <pre><code>def function(x):
      y = x + 2
      return y
  </code></pre>
  
  <p>This code is giving me the usual trouble, an <strong>indentation error</strong>:</p>
  
  <pre><code>   return y
      ^
  IndentationError: unexpected indent
  &gt;&gt;&gt;     return y
    File "&lt;stdin&gt;", line 1
      return y
      ^
  IndentationError: unexpected indent
  &gt;&gt;&gt;
  </code></pre>
  
  <p>Needless to say that Jupyter or Spyder have no problem with this. I checked that on VSC tab gives 4 spaces. All similar questions are related to this, but I cannot fix it. </p>
  
  <p>Other, built in functions of Python work fine. </p>
  
  <p>Please give me some help or tips since I do not know how to escape this.</p>
  
  <p><strong>UPDATE</strong> </p>
  
  <p>Installing again Python3 this simple code DOES work on Sublime but still not on VS Code. I still get the same error in VS Code.</p>
  
  <p><strong>UPDATE2</strong></p>
  
  <p>So, another update. If I change from <code>return</code> to <code>print</code> and instead of shift-command debug and run the code then it works.  </p>
  
  <p>Any idea what is going on?</p>