title: Working with key-value pairs in two dictionaries (Python)
body: <p>Say I have two dictionaries:</p>
  <pre><code>score={&quot;hello&quot;: 5, &quot;goodbye&quot;: 1, &quot;how are you&quot;: 7}
  word_count = {&quot;hello&quot;: 1, &quot;goodbye&quot;: 1, &quot;how are you&quot;: 3}
  </code></pre>
  <p>And an input:</p>
  <pre><code>text=input(&quot;Enter your text here: &quot;)
  text_list = text.split(&quot; &quot;)
  </code></pre>
  <p>And, if the key is in the input, I want to print the value. How do I do this (using a for loop inside a for loop prints it twice)?
  My output looks like this:</p>
  <pre><code>for sentence, rating in score:
     for sent, rate in word_count:
         number = int(rating) / (int(rate) - len(text_list))
         print(number)
  </code></pre>