title: Python Usernames and Passwords
body: <p>I am trying to create a program in which you can create, log in, and delete accounts. I have made 2 lists, one with usernames and one with passwords. The script asks for an input and if you say log in, it says:</p>
  
  <pre><code>if loginchoice=='login':
      choice = raw_input("What is your username? ")
      choice2 = raw_input("What is your password? ")
      if choice in accounts:
          option1=1
      else:
          option1=0
      if choice2 in password:
          option2=1
      else:
          option2=0
      if option1==1 and option2==1:
          print "Welcome to Telemology,", choice
      else:
          print "The username or password you entered is incorrect. Please try again or register."
  </code></pre>
  
  <p>As you can see, it only checks to see if the inputs are already in the lists. It doesn't see if the inputs have the same index. I can't put "accounts.index(choice)" because it treats 'choice' as an integer. The same goes for quotations because of strings. It doesn't treat them as variables. Is there any way around this?</p>
  
  <p>I hope that if my question gets answered, two people won't register simultaneously and glitch the indices.</p>