title: how to make a phrase in python that is input by a user not case
body: <p>I am trying to fix my code so when the user enters a phrase for instance <strong>cat</strong> but in the directory that they are telling the script to look at to find the phrase the word is spelled <strong>Cat</strong> or <strong>CAt</strong> or <strong>CAT</strong> or <strong>cAT</strong> it will still return showing the phrase is in the directory and where it is. I have attached my code below:</p>
  
  <pre><code>import os
  
  phrase_to_look_for = input("What phrase would you like to look for?")
  name_of_directory = input("What is the name of your directory?")
  for subdir, dirs, files in os.walk(name_of_directory, phrase_to_look_for):
          for file in files:
                  file_path = os.path.join(name_of_directory, subdir, file)
                  file_to_search = open(file_path,'r')
                  try:
                          contents_of_file = file_to_search.read()
                  except:
                          contents_of_file = ''
                  if phrase_to_look_for in contents_of_file:
                          print("The word is in the file: " + file)
                  else:
                          print("The phrase is not in the file.")
  </code></pre>
  
  <p>Thanks for your help in advance.</p>