title: "ValueError: list.index(x): x not in list" in Python, but it exists
body: <p>I want to use Python to pull the username from an email address. The solution I thought of was to append the email address into a list, find the index of the <code>@</code> symbol, and then slice the list until I found the index.</p>
  
  <p>My code is:</p>
  
  <pre><code>#!/usr/bin/env python&lt;br/&gt;
  email = raw_input("Please enter your e-mail address: ")
  email_list = []
  email_list.append(email)
  at_symbol_index = email_list.index("@")
  email_username = email_list[0:at_symbol_index]
  print email_username
  </code></pre>
  
  <p>But, everytime I run the script, it returns the error:</p>
  
  <pre><code>ValueError: list.index(x): x not in list
  </code></pre>
  
  <p>What's wrong with my code?</p>