Wrote function to take in text file and generate list of items