Open a file and read its contents line by line into a list.