title: Iteravely generate keys and count number of words
body: <p>Is there a way to iterate your way through a dictionary to count the number of words with the string stored within the dictionary, and save it as a new dictionary that returns the word count for each item of that key?</p>
  
  <p>For example...</p>
  
  <pre><code>#Input:
  inputdict = {
      'key1': 'The brown fox is brown and a fox.', 
      'key2': 'The red dog is the red and is a dog.'
  }
  
  newdict = {}
  for k, v in inputdict:
      newdict(str(k) + "_" + str(v)) = count(v)
  
  #Output:     
  newdict = {
      'key1_the': 1, 'key1_brown': 2, 'key1_is': 1, # ...
      'key2_the': 2, 'key2_red': 2, # ...
  }
  </code></pre>
  
  <p>Side Note:
  This is kind of a follow up from an article at <a href="https://janav.wordpress.com/2013/10/27/tf-idf-and-cosine-similarity/" rel="nofollow noreferrer">https://janav.wordpress.com/2013/10/27/tf-idf-and-cosine-similarity/</a>.  Where instead of reading in strings I'm trying to read in items from a dictionary.</p>