title: Python-what causes this error on my dictionary and how can I fix it?
body: <p>My function is given a dictionary (db) and a list of strings (types). I need to take that list of strings and see if any of those strings are in the dictionary's values. If the string is in the value, I need to create a new dictionary and update it with items that contain that string in their values. </p>
  
  <p>Ex:</p>
  
  <pre><code>types=['poison','Grass']
  db={"Bulbasaur": (1, "Grass", "Poison", 45, 49, 49, 45, 1, False),}
  d={"Bulbasaur": (1, "Grass", "Poison", 45, 49, 49, 45, 1, False)} #adds the info for that pokemon
  </code></pre>
  
  <p>I keep getting this error when I run my code:</p>
  
  <blockquote>
    <p>ValueError: dictionary update sequence element #0 has length 1; 2 is required</p>
  </blockquote>
  
  <pre><code>def pokemon_by_types(db,types):
      d={}
      for item in types:
          types=item
          for key,values in db.items():
              if types in values:
                  d.update(key)
      return d
  </code></pre>
  
  <p>What does this error mean and how can I fix it? It is actually a problem I have gotten on several of my other functions.</p>