title: Checking against Nltk POS tags
body: <p>I am just learning nltk using Python. I am using POS tagging. What I want to know is how do I use the tags. For example, this is the pseudocode:</p>
  
  <pre><code>words = []
  teststr = "George did well in the test."
  tokens = nltk.word_tokenize(teststr)
  words = nltk.pos_tag(tokens)
  </code></pre>
  
  <p>I want to do something like this:</p>
  
  <pre><code>if words[i] == "proper noun":
      #do something
  </code></pre>
  
  <p>How do I check whether a word is a noun or a verb or any other part of speech.
  Can someone please help me out here?
  Thanks.</p>