title: How to remove a directory including all its files in python?
body: <p>I'm working on some Python code. I want to remove the <code>new_folder</code> including all its files at the end of program.</p>
  
  <p>Can someone please guide me how I can do that? I have seen different commands like os.rmdir but it only removes the path. Here is my code:</p>
  
  <pre><code>for files in sorted(os.listdir(path)):
    os.system("mv "+path+" new_folder")`
  </code></pre>
  
  <p>The code above will move a folder (called check) into new_folder. I want to remove that check folder from the new_folder.</p>