import glob
files = glob.glob('sample/*.txt')
books = []
for file in files:
with open(file, 'r', encoding='utf8') as infile:
books.append(infile.read().replace('\n', ' '))
books[0][:800]
I used this code to read in the data but I'm having trouble doing anything with this data.