No such file or directory?
<p>For some reason despite having the file in the main and in the same directory, I keep getting the no such file error. Any help is appreciated. </p>

<pre><code>    import time
    def firstQues():

            print('"TT(Announcing): HONING IN FROM SU CASA CUIDAD, (Their hometown)"')
            time.sleep(3)
            print('"VEN EL UN.....(Comes the one.....)"')
            time.sleep(2)
            print('"EL SOLO......(The ONLY.....)"')
            time.sleep(3)
            print('"CampeÃ³n NOVATO (NEWBIE CHAMP)"')
            print()


            text_file = open("Questions1.txt", "r")
            wholefile = text_file.readline()
            for wholefile in open("Questions1.txt"):
                    print(wholefile)
                    return wholefile
                    return text_file

    def main():
            firstQues()
            text_file = open("Questions1.txt", "r")
    main()
</code></pre>

<pre><code>  with open("Questions1.txt", "r") as f:
       file_data = f.read().splitlines()
  for line in file_data:
      #do what ever you want 
</code></pre>

<p><a href="http://stackoverflow.com/questions/3277503/how-to-read-a-file-line-by-line-into-a-list-with-python">How to read a file line by line into a list with Python</a></p>

python python-3.x