Python: Searching for an exact match
<p>There often comes a time, where  you have to search your list for the string. Say a username database, and the database is a dictionary or a list, depending on your code configuration, and you want to search for the <em>exact</em> username. The code as shown below is not suitable for such purposes, however, as you can see in the demonstration:</p>

<pre><code>&gt;&gt;&gt; usernames = ["john","doe"]
&gt;&gt;&gt; user = raw_input (" ")
 jo
&gt;&gt;&gt; if user in usernames:
...     return True
True
</code></pre>

<p>As you can see, there is this small but still large problem, which is a complete loophole in a secure system.</p>
