title: How to find string from a list of strings with a specific list of characters?
body: <p>I have a given list of string and a list of characters and I want to check the string with containing a specific character. Here is an example:</p>
  
  <pre><code>Dictionary = ["Hello", "Hi"]
  Character = ['e','i']
  </code></pre>
  
  <p>it must return a "Hello" else empty list</p>
  
  <p>I am comparing a list of characters with a list of strings but it is giving me a type error.</p>
  
  <pre><code>Dictionary = ["Hello", "Hi"]
  Character = ['e']
  emptystring = ""
  def findwords(dictionary,character):
     for i in dictionary,character:
        for j in dictionary:
            if character[i] == dictionary[i][j]:
               return dictionary[i]
            else:
               j+=1
      i+=1
  return emptystring
  
  k = findwords(Dictionary,Character)
  k
  
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-49-996912330841&gt; in &lt;module&gt;
  ----&gt; 1 k = findwords(Dictionary,Character)
        2 k
  
  &lt;ipython-input-48-9e9498ec1a51&gt; in findwords(dictionary, character)
        5     for i in dictionary,character:
        6         for j in dictionary:
  ----&gt; 7             if str(character[i]) == str(dictionary[i][j]):
        8                 return str(dictionary[i])
        9             else:
  
  TypeError: list indices must be integers or slices, not list
  </code></pre>