Try this:
cur = conn.cursor()
showdata = "SELECT * FROM testtable"
try:
cur.execute(showdata)
rows = cur.fetchall()
print(rows)
except:
print ("Data not found!")
Try this:
cur = conn.cursor()
showdata = "SELECT * FROM testtable"
try:
cur.execute(showdata)
rows = cur.fetchall()
print(rows)
except:
print ("Data not found!")