If you want a flat list, you must do the flattening in Python — ideally using a list comprehension.
cursor.execute("SELECT cat_name FROM categories") categories = [row[0] for row in cursor.fetchall()]