What is wrong if the code in lines 20–24 in Listing 13.18 is replaced by the following code?
while not end_of_file:
try:
print(pickle.load(infile), end = " ")
except EOFError:
end_of_file = True
finally:
infile.close() # Close the input file
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.