result = 'test'
cursor.execute("SELECT message FROM table WHERE field = %s", (result,))
for row in cursor:
if row == "":
print('the list is empty')
print(row)
if not row == "":
print('the list is not empty')
print(row)
if row == "" or not row == "":
print('the list is empty or not empty')
print(row)