title: Python won't load text file without two extensions: FileNotFoundError: [Errno 2] No such file or directory
body: <p>Okay so I am very new to Python. Been working on a project, but for whatever reason I get the</p>
  <blockquote>
  <p>&quot;FileNotFoundError: [Errno 2] No such file or directory: 'yt.txt'&quot;</p>
  </blockquote>
  <p>unless in Python I call the extension twice. I'll try to better describe it below.</p>
  <pre class="lang-py prettyprint-override"><code>def mp():
      with open(&quot;yt.txt&quot;, &quot;r&quot;) as my_file:
          str = my_file.read()
          print(str)
      mp()
  </code></pre>
  <p>Above is the code. The script won't work unless it's named <code>yt.txt.txt</code> I've tried searching here and other forums but I can't seem to figure it out. The file IS in the same directory as the script, it works with the double extension just not with the single extension. Any help would be appreciated. If you need any additional info just let me know.</p>