title: Why does os.getcwd() return different values in vs code and terminal?
body: <p>I wrote a simple python3.7 code like this :</p>
  
  <pre><code>import os
  
  if __name__ == "__main__":
      c = os.getcwd()
      print(c)
  </code></pre>
  
  <p>This code path is <code>~/PyStudy/OsTest/test.py</code></p>
  
  <p>When I ran it in VS Code and Terminal, different results appeared.</p>
  
  <ul>
  <li>in Terminal, it returned: <code>~/PyStudy/OsTest</code> <br/></li>
  <li>in VS Code, it returned: <code>~/PyStudy</code> without <code>/OsTest</code>.</li>
  </ul>
  
  <p>I used Code Runner in VS Code to run python code.</p>
  
  <p>I don't know why, please help me. </p>