Python 我想在插入句中指定数组

Python 我想在插入句中指定数组,python,orientdb,Python,Orientdb,我使用pyorient。 下面的东西想做,但什么也注册不了 lst = ['10', '20', '30'] var = 2016 client.command("insert into class1 (datet, price) values(var, lst[0])") 你可以用 lst = ['10', '20', '30'] var = 2016 client.command("insert into class1 set datet='%d', price='%s'" % (var

我使用pyorient。 下面的东西想做,但什么也注册不了

lst = ['10', '20', '30']
var = 2016
client.command("insert into class1 (datet, price) values(var, lst[0])")
你可以用

lst = ['10', '20', '30']
var = 2016

client.command("insert into class1 set datet='%d', price='%s'" % (var,lst[0]));


希望能有所帮助。

感谢您的友好回复。谢谢!
client.command("insert into class1 (datet,price) values ('%d','%s')" % (var,lst[0]))