title: Search letters in a text file Python
body: <p>I was wondering if someone could help me. I'm a beginner in Python. What I want to do is to type any letters and the program has to find them in a text file with a list of objects. It has to print the object that contains all the letters in no order specific.
  For example, I have a text file with 5 words:</p>
  
  <pre><code>yellow
  morning
  sea
  soiberg
  sand
  </code></pre>
  
  <p>I want the program to show all the words that contain the letters <code>"goi"</code>.</p>
  
  <p>Result:</p>
  
  <pre><code>morning
  soiberg
  </code></pre>
  
  <p>What I have at this moment is this: </p>
  
  <pre><code>with open('d:\lista.txt', 'r') as inF:
     l = input("Buscar: ")
     for line in inF:
         if l[0] in line:
            if l[1] in line:
                if l[2] in line:
                   print(line)
  </code></pre>
  
  <p>But what if I want to find only 2 letters or 5 or 7. I don't know what to do</p>