Possible Duplicate:
python tuple to str
Here is the data from the database, I ran out.
>>> policy_id = ((2309L,), (118L,), (94L,))
>>> for i in policy_id:
print i
(2309L,)
(118L,)
(94L,)
But I want the result as:
i[0]=2309
i[1]=118
i[2]=94
mysql:
and p.policy_id in ('%s','%s','%s') %(i[0],i[1],i[2])