0

I am trying to insert a list in python into one row in MySQL:

list = [1,2,3,4]
cursor.execute('insert into (table name) (column name) values (%s)', list)

But getting this error:

Python 'list' cannot be converted to a MySQL type

Is there any way to accomplish this without converting it to a string?

Selcuk
  • 52,758
  • 11
  • 94
  • 99
clayNuts
  • 1
  • 1

0 Answers0