title: how can I import a dependent file into the main file in python?
body: <p>consider I have a mainfile.py and some other files like a.py, b.py, c.y etc, which match exactly in a specific line of the main file, how is it possible for me to import one or all of them into the main file even in the middle of a loop?. I am familiar with the;</p>
  
  <pre><code>import sys
  
  sys.path.append('path/to/...')
  </code></pre>
  
  <p>but it doesn't help since the little files are completely dependent to the main file. It is just like I have cut a part of the main file to other files and I want the main file to replace them just like they are a part of the main file.</p>