title: For loop store outcome in variable
body: <p>I'm learning to webscrape data so I can use it to practice data visualization, and I am following a tutorial but I can't get the same results. The problem is that I have a for loop, but cant seem to store the data in a variable. When I run the for loop and try to store the results in a variable i will only get one result, but when i immediately print the for loop results i get all the data.</p>
  <p>Can someone explain what I'm doing wrong?</p>
  <pre><code>for age in team_riders:
    print(age.find('div', class_='age').text)
  </code></pre>
  <p>Results:</p>
  <pre><code>30
  28
  28
  22
  34
  28
  25
  30
  30
  30
  34
  32
  33
  32
  24
  27
  23
  26
  22
  27
  30
  28
  24
  26
  21
  26
  36
  26
  27
  22
  32
  30
  </code></pre>
  <pre><code>for age in team_riders:
    age = age.find('div', class_='age').text
  
  print(age)
  </code></pre>
  <p>prints:</p>
  <pre><code>30
  </code></pre>