Q:

Insert list in database MySQLdb Python3.6

I am having a problem inserting a list in to a mysql database with the MySQLdb driver.
 import MySQLdb

db = MySQLdb.connect("localhost", "user", "password", "db")

c = db.cursor() 
cities = ["New York", "NY", 8400000]

sql = "INSERT INTO projecten.population(city, state, population) VALUES(?, ?, ?)", cities

try:
    c.execute(sql)
    db.commit()
except MySQLdb.OperationalError:
    print("error")
finally:
    db.close()

This is the error
TypeError: a bytes-like object is required, not 'tuple'

A:

I got the answer 
c.executemany("INSERT INTO projecten.population(city, state, population) VALUES(%s, %s, %s)", (cities))

