title: can't read from txt file python
body: <pre><code>def add(num1,num2):
      print(num1+num2)
  
  
  try:
      filename = input()
      f = open(filename,"r")
      readFile = f.readlines()
      f.close()
      for line in readFile:
          exec(line)
  
  except FileNotFoundError:
      print("Failed to open",filename)
  </code></pre>
  
  <p>I have a function called add() given a text file with values like this add(12345667890123456789,8765432109876543210). I need to open text file then execute that function. Why doesn't the code above open the file?</p>