I have a python list, say l
l = [1,5,8]
I want to write a sql query to get the data for all the elements of the list, say
s
Easiest way is to turn the list to tuple first
tuple
t = tuple(l) query = "select name from studens where id IN {}".format(t)