title: Trying to delete directories with an 'X' as the 4th character in the name
body: <p>I have a folder with folders inside that contain files so I know I need to use shutil.rmtree but choosing to delete the folders where the 4th character is an 'X' is throwing me off so do I need a counter? So far I have:</p>
  <pre><code>import shutil
  
  for some_dir in 'dir_name':
      if some_dir[4] == 'X':
  
  for x in 'dir_name':
      shutil.rmtree('dir_name')
  </code></pre>