title: Is it possible to use 2 different BeautifulSoup soup.select in one for loop?
body: <p>Is it possible to reduce the code so that I have one for loop instead of two? The reason why I want to do this is because it's a time critical crawling loop.</p>
  
  <pre><code>i = 0
  data = []
  data.append([])
  data.append([])
  
  for product in soup.select('div &gt; span.name'):
      data[0].append(product.text)
      i += 1
  
  i = 0
  
  for product in soup.select('div &gt; span.value'):
      data[1].append(product.text)
      i += 1
  </code></pre>
  
  <p>This is the HTML Part I want to get the data out:</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;&lt;div id="pagecontent"&gt;&lt;div id="container"&gt;&lt;div id="content"&gt;&lt;div id="tab-description"&gt;&lt;div id="attributes"&gt;
  &lt;div class="attr"&gt;
      &lt;span class="name"&gt;Ugug&lt;/span&gt;
      &lt;span class="value"&gt;dfgd454&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>