It never has the first time through as it reads first and if the file does not exist it stops with error message.
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852
Simple try...except around reading old file should suffice, with correct initialization of the list (alternatively you can create empty file in except in case of you can not read one in try). pyguy62's fix of your code is flaky and messy as he says (push enter in first loop at first run and you end doing again read of non-existing file same as before).
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852