def chek_db(a):
conn = sqlite3.connect('database.sqlite')
res = conn.execute("SELECT q_id, q_title FROM q_main WHERE q_title LIKE" + '\'' + a + '\'')
res1 = len(res.fetchall())
if res1 == 0:
result = 0
else: result = 1
return (result)