Python simple email validity check
<p>In Python, if i wanted to write something that returns a boolean True as long as the @ symbol appears after the . symbol, how would I write this? </p>

<p>I have tried writing something like:</p>

<pre><code>if myString[x] == "@" &gt; myString[x] == ".":
     return True
</code></pre>

<p>but, I assume that this won't work because they're both essentially the same index. Looking for some explanation as well, just learning a lot of basics still. 
Thanks!</p>

<p><code>return str.find('@') &gt; str.find('.') and str.find('.') &gt; -1</code></p>

<p>This will check that <code>@</code> is after <code>.</code>, and that both symbols are present in the string. This is however a <strong>very</strong> bad way to check for email validity.</p>

python