How to manage the following:
listing = db.query("SELECT list_id FROM results limit 10")
returns a list containing values converted to long type : ({'list_id': 175L},...)
element = db.query("SELECT * FROM list LIMIT 1")
returns returns a single element which has a standard int id : element['id'] = 175
Now i would like to do something like this:
if element['id'] not in listing:
print "ok"
But the loop is never entered. I think it is because of the different types in the list (long) and element (int).
Is there a quick and simple solution to solve this problem?
Thanks