I'll assume you know how to progressively get each list element in order from first to last, how to append a new element to the end of a list, and basic file IO and string operations.
Take elemList and write each element to a text file, named 1.txt, 2.txt, and so on.
Then take sortList, convert each element to a string, append ".txt", open the corresponding file, and insert its contents onto the result list.
There are more elegant solutions to this problem, but this one will leave your teacher with little doubt it's your own work.