title: Login script using Python and SQLite
body: <p>I'm trying to create a login script using SQLite to store the user data. Any ideas on how to to that? I have research over hours and found nothing of the kind. I would appreciate any help! :)</p>
  
  <p>This is what I got so far:</p>
  
  <pre><code>user = raw_input "User:"
  pswd = getpass.getpass "Password"
  
  db = sqlite3.connect('/SABB/DATASETS/SENHAS')
  c = db.cursor()
  c.execute('SELECT 1 from sabb WHERE usuario = "user"')
  ('SELECT 1 from sabb WHERE senha = "pswd"')
  if c.fetchall() is True:
      print "Welcome"
  else:
      print "Login failed"
  </code></pre>
  
  <p>But it always returns Login failed... I want to check the input "user" and the input "pswd" against the database and if they match, return Welcome. </p>
  
  <p>I changed it to:</p>
  
  <pre><code>db = sqlite3.connect('/SABB/DATASETS/SENHAS')
  c = db.cursor()
  login = c.execute('SELECT * from sabb WHERE usuario = "user" AND senha = "pswd"')
  if (login &gt; 0):
      print "Welcome"
  else:
      print "Login failed"
  </code></pre>
  
  <p>But I'm still getting Welcome every time. I also tried "if (login == 1)" but then it only returns Login failed.</p>