code: def substring_search(query, list_of_strings, limit_results=DEFAULT_LIMIT):
      
  
      matching = []
  
      query_words = query.split(' ')
  
      # sort by longest word (higest probability of not finding a match)
      query_words.sort(key=len, reverse=True)
  
      counter = 0
  
      for s in list_of_strings:
  
          target_words = s.split(' ')
  
          # the anyword searching function is separate
          if(anyword_substring_search(target_words, query_words)):
              matching.append(s)
  
              # limit results
              counter += 1
              if(counter == limit_results):
                  break
  
      return matching
docs: main function to call for searching