title: How do I compare two strings using a for loop?
body: <p>I'm building a simple email verifier. I need to compare the local-parts current letter to a list of valid characters. So essentially I'm asking how do I check to see if the current letter I'm on in local-part is equivalent to a letter in the ENTIRE list of valid chars. If it is a valid character, local-part will go to the next letter in its string and go through the list of valid characters to see if this too is and so on until it reaches the @ symbol unless there isn't a valid character. </p>
  
  <p>I'm fairly new to python so I don't know how nested for loops work. </p>
  
  <pre><code>for ch in local:
      for ch in valChar:
      if(ch ==ch) &lt;----problem
  </code></pre>
  
  <p>This is what I currently have written for the loops. Is "ch" a variable or some type of syntax to represent char? </p>