title: How can I arrange this function so it returns a list with all this lists on it
body: <p>So I've been working on a project and I can only use Tkinter. The thing is that I need that this function that I found in someone else's question returns a list with the lists its already printing, but I can't find a way to make this happen. Currently it prints a list for every line there is in the .txt file and inside each list it has the words of the line its referring to. I need it to do that but all those lists that its printing should go inside one list. I am very new at this so sorry for the stupid question:</p>
  <pre><code>    def file_to_list(file):
          stop_words=open(file,'r') 
          lines = [line.split() for line in stop_words]
          for line in lines:
              print(line)
  </code></pre>