title: Subtract values from dictionary from user input. (Python)
body: <p>I am trying to create a code that checks if a message is write-able from a few sentences in a text file which looks like this:</p>
  <blockquote>
  <p>The jerboa forms the bulk of the membership of the family Dipodidae. Jerboas are hopping desert rodents found throughout Northern Africa and Asia east to northern China and Manchuria. They tend to be found in hot deserts.</p>
  <p>When chased, jerboas can run at up to 24 kilometres per hour. Some species are prey for Little Owls (Athene noctua) in central Asia. Most species of jerboa have excellent hearing which allows them to avoid becoming the prey of these nocturnal predators. The typical lifespan of a jerboa is around 6 years.</p>
  </blockquote>
  <p>My code so far looks like this:</p>
  <pre><code>from collections import Counter
  d = {}
  with open(&quot;magazine.txt&quot;) as magazine:
      for line in magazine:
         magazine = str(&quot;&quot;.join(line.split()))
      magazine = list(magazine.lower())  
      magazine = Counter(magazine)
      message = input('Message: ')
      message = ''.join(message.split())
      message = list(message.lower())
      message = Counter(message)
  </code></pre>
  <p>I want to see if the characters inputted by the user can ALL be found in the text file, in which I currently have a counter function to count the number of each letter in the alphabet. The result looks like this if I printed the two variables:</p>
  <pre><code>Counter({'s': 3, 'e': 3, 't': 2, 'm': 1, 'a': 1, 'g': 1})
  Counter({'e': 34, 'a': 23, 'o': 21, 't': 18, 'r': 18, 's': 17, etc....
  </code></pre>
  <p>If this is wrong, can someone tell me how to do it correctly? I want it so that the code subtracts the letters of the input one by one from the list/dictionary. and to print &quot;Message can be printed&quot; if all letters can be found and &quot;Some letters missing&quot; if some letters can't be found. (I assume you need a for loop?) Sorry, I am only a beginner.</p>