title: view function did not return a valid response. The return type must be a string, dict, tuple, Response instance, or WSGI callable, but it was a list
body: <p>TypeError: The view function did not return a valid response. The return type must be a string, dict, tuple, Response instance, or WSGI callable, but it was a list.</p>
  <pre><code>from flask import Flask, jsonify, request
  from pytube import YouTube
  app = Flask(__name__)
  
  @app.route('/youtube', methods=['POST'])
  def hello_world():
      url = request.form['d_url']
      yt_video = YouTube(url)
      videos = yt_video.streams
      res_list = list(enumerate(videos))
      return res_list
  
  if __name__ == &quot;__main__&quot;:
      app.run(debug =True)
  </code></pre>