title: Inserting a list holding multiple values in MySQL using pymysql
body: <p>I have a database holding names, and I have to create a new list which will hold such values as ID, name, and gender and insert it in the current database. I have to create a list of the names which are not in the database yet. So I simply checked only 3 names and trying to work with them.</p>
  
  <p>I am not sure what sort of list I suppose to create and how I can loop through it to insert all the new values in the proper way.</p>
  
  <p>That's what I have so far:</p>
  
  <pre><code>mylist = [["Betty Beth", "1", "Female"], ["John Cena", "2", "Male"]]
  
  @get("/list_actors")
      def list_actors():  
           with connection.cursor() as cursor:
                      sql = "INSERT INTO imdb VALUES (mylist)"
                      cursor.execute(sql)
                      connection.commit()
                      return "done"
  </code></pre>
  
  <p>I am very new to this material so I will appreciate any help. Thanks in advance!</p>