After saving some data in a variable with cursor.fetchall()
, it looks as follows:
mylist = [('abc1',), ('abc2',)]
this is apparently a list.
That is not the issue.
The problem is that the following doesn't work:
if 'abc1' in mylist
it can't find 'abc1'. Is there a way in Python to do it easily or do I have to use a loop?