title: How to solve this loop problem in python flask?
body: <p>I try to loop through every article and show it in web page but this is what happens..</p>
  
  <p>My python code:</p>
  
  <pre><code>@app.route('/scrapper')
  def scrapper():
  
      response = requests.get('http://newsapi.org/v2/top-headlines?country=us&amp;category=business&amp;apiKey=api-key')
  
      data = response.json() 
      articles = data['articles'] 
  
      for i in range(len(articles)):
          myarticles = articles[i]
  
      return render_template('news.html', myarticles=myarticles)
  </code></pre>
  
  <p>And this is how it looks like in html:</p>
  
  <pre><code>&lt;body&gt;
  {% for info in myarticles %}
      &lt;h2&gt;Title: {{myarticles.title}}  &lt;/h2&gt;
      &lt;p&gt;Author: {{myarticles.author}}  &lt;/p&gt;
      &lt;p&gt;Url: {{myarticles.url}}  &lt;/p&gt;
      &lt;p&gt;Content: {{myarticles.content}} &lt;/p&gt;
      &lt;p&gt;Date: {{myarticles.publishedAt}} &lt;/p&gt;
  {% endfor %}
  &lt;/body&gt;
  </code></pre>
  
  <p>This returns only one article but many times, as in <a href="https://i.stack.imgur.com/L9iJ2.png" rel="nofollow noreferrer">this photo</a>.
  This is my very first project like that so please, be forgiving.</p>
  
  <p>EDIT:
  I deleted loop and passed like you said. But now i got nothing, just empty page
  <a href="https://i.stack.imgur.com/Q1xC7.png" rel="nofollow noreferrer">like that</a>.</p>