title: Python multiple search string function
body: <p>I have below file  contents</p>
  
  <pre><code>apples:100
  books:100
  pens:200
  banana:300
  </code></pre>
  
  <p>I have below code to search string in file:</p>
  
  <pre><code>def search_string(file_search, search_string):
  
      search_output = []
      with open(file_search) as f:
          for line in f:
              if search_string in line:
                  search_output.append(line)
       return search_output
  </code></pre>
  
  <p>To search apples:</p>
  
  <pre><code>  search_string("filename", "apples")
  </code></pre>
  
  <p>Some cases, I have to search two or three strings depends on requirement  in same file, so I need to write separate functions, or can we achieve in same function. If same function can any one help</p>
  
  <p>for two string search I have below code:</p>
  
  <pre><code>def search_string2(file_search, search_string1, search_strin2):
  
      search_output = []
      with open(file_search) as f:
          for line in f:
              if search_string1 in line or search_string2 in line:
                  search_output.append(line)
       return search_output
  </code></pre>