title: How to import modules from a different directory in python
body: <p>I have written a module and stored it in a location say x and then I am running a program from a different location y. Now, I want to import that module in x. 
  How can I do that?</p>
  
  <p>I have tried doing the following before importing but it didn't work for scripts -</p>
  
  <pre><code>os.chdir(x)
  </code></pre>
  
  <p>I want to utilise only the default modules available in Python 3.8.1.</p>