title: Best way to deal with a FileNotFoundError
body: <p>so I'm on a project which requires me to read data from a .txt file. In order to do that I used the with function and now I want to deal with an eventual FileNotFoundError in case the file isn't named correctly or isn't there at all</p>
  
  <pre><code>while True:
      try:
          with open("etalons.txt", "r") as fichier: 
              etalons = []
              for ligne in fichier:
                 temp = ligne.split(',')
                 ets = {
                         'conc' : temp[0],
                         'abs' :  temp[1]
                         }
                 etalons.append(ets) # stockage des dicos dans liste
          break
      except FileNotFoundError:
          print("File not found. Check if the file is in the folder and it's name. ")
          time.sleep(20)
  </code></pre>
  
  <p>I came up with this but I feel like there is a best way to do this (seems overprocessed or something). Would something without the while loop be more appropriate or do you see another way to do this in a cleaner way ?</p>
  
  <p>I'm new to python so I will take any piece of advice</p>