title: Remove empty folders (Python)
body: <p>This is the folder tree:</p>
  
  <pre><code>FOLDER\\
         \\1\\file
         \\2\\file
         \\3\\
         \\4\\file
  </code></pre>
  
  <p>The script should scan (loop) for each folder in FOLDER and check if the sub-folders are empty or not. If they are, they must be deleted.</p>
  
  <p>My code, until now, is this:</p>
  
  <pre><code>folders = ([x[0] for x in os.walk(os.path.expanduser('~\\Desktop\\FOLDER\\DIGITS\\'))])
  folders2= (folders[1:])
  </code></pre>
  
  <p>This scan for folders and, using <code>folders2</code> begin from the firs folder in <code>DIGITS</code>.
  In <code>DIGITS</code> there are numbered directories: 1,2,3,4,etc</p>
  
  <p>Now what? Tried using <code>os.rmdir</code> but it gives me an error, something about string. In fact, <code>folders2</code> is a list, not a string, just saying...</p>