I have below file contents
apples:100
books:100
pens:200
banana:300
I have below code to search string in file:
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
To search apples:
  search_string("filename", "apples")
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
for two string search I have below 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
 
     
    