Can read input and store data from a .txt file in a list