title: How to join two generators in Python?
body: <p>I want to change the following code</p>
  
  <pre><code>for directory, dirs, files in os.walk(directory_1):
      do_something()
  
  for directory, dirs, files in os.walk(directory_2):
      do_something()
  </code></pre>
  
  <p>to this code:</p>
  
  <pre><code>for directory, dirs, files in os.walk(directory_1) + os.walk(directory_2):
      do_something()
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>unsupported operand type(s) for +: 'generator' and 'generator'</p>
  </blockquote>
  
  <p>How to join two generators in Python?</p>