Dec-19-2020, 07:02 AM
As I said before, interspersing function definitions with other code will make it harder to follow the execution.
Line 46 is inside the function read_history(), so the variable assigned there is local to the function. It is not accessible outside the function. So when line 55 attempts to reference it, there is an error.
Line 46 is inside the function read_history(), so the variable assigned there is local to the function. It is not accessible outside the function. So when line 55 attempts to reference it, there is an error.