title: To check if filename has substring of a word in a list
body: <p>I have a list of keywords and I want to go through a directory looking for filename that contain the keyword. If found, binds the matching keyword and file path to a dictionary.</p>
  
  <pre><code>keywords = ['mon', 'tue', 'wed']
  dict = {}
  
  directory = os.fsencode(r"my_dir")
  
  for file in os.listdir(directory):
    filename = os.fsdecode(file)
    ext = Path(file).suffix
  
    if filename in keywords:
      filepath = os.path.join(directory, filename, ext)
      dict[keyword] = filepath
  </code></pre>
  
  <p>So at the end I want something like this:</p>
  
  <pre><code>{'mon': 'F:\mon_001.txt', 'tue': 'F:\tue_999.txt', 'wed': 'F\wed_123.txt'}
  </code></pre>
  
  <p>Now how do I find the match?</p>