title: Python SQLite Select from Database
body: <p>My Database</p>
  <pre><code>import sqlite3 
  conn = sqlite3.connect('Karteikarten.db')
  c = conn.cursor()
  
  # c.execute('''CREATE TABLE Karteikarten
  #             ([Frage] text, [Antwort] text)''')
  
  F1 = input(&quot;Frage: &quot;) A1 = input(&quot;Antwort: &quot;)
  
  c.execute('INSERT INTO Karteikarten Values ( ?, ?)', (F1, A1,))
  # c.execute('SELECT * FROM Karteikarten')
  # print(c.fetchall())
  
  conn.commit()
  conn.close()
  </code></pre>
  <p>Now to my question. How can I take the selected input from the database and print it out? I want to compare it with an input from a user later.</p>
  <pre><code>import sqlite3
  
  conn = sqlite3.connect('Karteikarten.db')
  
  c = conn.cursor()
  
  DBF1 = c.execute('SELECT Frage FROM Karteikarten ORDER BY RANDOM() LIMIT 1')
  print(DBF1)
  
  conn.commit()
  conn.close()
  </code></pre>