You are on page 1of 1

Start code defining inuput from file unsorted_fruits.

txt in read mode


define the output as sorted_fruits.txt in write mode
read the input file
create a list based on the input file
sort the file into alphabetical order
remove any blank lines
write the new list out to file
close the files that were opened

You might also like