title: Populate an empty list with a txt file
body: <p>I am trying to open a .txt file, read it and then populate a previously crated empty list but I am not getting any output from my return statement. Any help will be appreciated!</p>
  <p>The code I have is the following:</p>
  <pre><code>def get_stopwords_list(stop_word_file):
      stop_word_file = open(os.path.join(os.getcwd(), &quot;stop_words.txt&quot;), 'r', encoding=&quot;utf8&quot;)
      #stop_words = stop_word_file.read()
      stop_word_list = []
  
      stop_words = stop_word_file.read()
      for lines in stop_words:
          list = lines.splitlines()
          stop_word_list.append(list)
  
      # read the file stop_word_file and put all the words into a list and return it
      # to learn how to read a file, please look into the __main__ section below
      # once you have the content of the file into a variable
      # think how can you split the file content into words and assign it to a list,
      # and return the list
      return stop_word_list
  </code></pre>