title: Reading line by line from a text file with sentences in Python and assigning it a value
body: <p>I'm working on a Machine Learning model that classifies a given line as belonging to a particular novel. The data set contains xtrain.txt, ytrain.txt. Each line in xtrain.txt comes from a different novel. The corresponding novel ids are specified in ytrain.txt. I'm trying to train the data from xtrain.txt and ytrain.txt </p>
  
  <p>xtrain.txt contains lines of sentences. The problem I'm facing is how to read each line in xtrain.txt and assign it to a value in python so that I can train the data sets. </p>
  
  <p>I hope to get some help here.    </p>