As the Preliminary state of the second execution is Completely wrong, the ensuing computation is also wrong. Since sooner or later the second execution will update the ultimate condition with the incorrect final result.For anyone who is on Python 2, it is possible to backport the pathlib module from pypi, pathlib2, or usually Check out isfile with