deque is empty python code example
Example 1: if query empty print python
# cursor.rowcount will usually be set to 0.
if cursor.rowcount == 0:
print("No results")
elif cursor.rowcount > 0:
for results in result_from_query:
print(results)
Example 2: python deque empty
if d:
# not empty
else:
# empty