title: Printing a list in Flask
body: <p>I want the script to make a list of the news headlines that it grabs from Reddit and display them as a text output. However it seems like the return function prevents me from doing that as it only lists one title.</p>
  
  <pre><code>from flask import Flask
  import praw
  import config
  
  app = Flask(__name__)
  
  @app.route('/') 
  def index():
      reddit = praw.Reddit(client_id=config.client_id, client_secret=config.client_secret, user_agent="...")
  
      for submission in reddit.subreddit('worldnews').controversial(limit=10):
          print(submission.title)
  
      return(submission.title)
  
  if __name__ == "__main__":
      app.run(debug=True)
  </code></pre>