I do sampling from SQL
cur = db.cursor() cur.execute("SELECT FL_ARCHIVE FROM ROUTE WHERE FL_ARCHIVE >= 10") select_results = cur.fetchall() for result in select_results: print result Then for each sample element equal to ten for example, I want to run a specific function. The problem is that from the database I don’t return 10, but
(10,) (10,) (11,) Of course, I understand that you can take a bite out of everything extra, but I guess I’m doing something wrong if this result is obtained.
By the way, is this 10 a string or a number? Those. I need to write
if result == '10': or can:
if result == 10: