enumerate trouble in python
<p>A little background on the program. it sets up a graphwindow with 2 pictures of the candidates, some instructions and an entry box, the user then puts the abbreviation into the entry box and clicks on one of the candidates and it displays the amount of votes are equivalent to whatever state then entered. I am having trouble writing an exception handler thats supposed to print an error message if the user enters a state that is not in my list. heres the section of the code that im having trouble with:</p>

<pre><code>    while True:
      vote = win.getMouse()
      voteX = vote.getX()
      voteY = vote.getY()
#Romney
      if voteX &gt;= 163 and voteX &lt;= 237 and voteY &lt;= 100:
         enteredtext = entrybox.getText()
         enteredtextu = enteredtext.upper()
         for i, s in enumerate(STATE_LIST):
            if enteredtextu != s:
                print('Not a state')


            else:
                totalvotesr += STATE_VOTES[enteredtextu]
                votesnumr = ('VOTES:' ,totalvotesr)
                displayvotesr.setText(votesnumr)
                entrybox = Entry(Point(WINDOW_WIDTH/2, WINDOW_HEIGHT/1.1), 10)
                entrybox.draw(win)
                if totalvotesr &gt;= 270:
                    circle_winner(win, Point(WINDOW_WIDTH/4, WINDOW_HEIGHT/12))
                    cross_out_loser(win, Point(WINDOW_WIDTH/(4/3), WINDOW_HEIGHT/12))
</code></pre>

<p>STATE_LIST is a list of all 50 states abbreviated. What i tried to do is use enumerate and have it check entereredtextu to all items in the list and if it isnt there it would print "Not a state". the problem i am having is that when i enter a state thats not in my list it prints "Not a state" 50 times and when i enter a state that is on the list it displays the amount of votes like its supposed to, but also prints "Not a state" 50 times</p>
