thats the point it is printing falsebut if it is true you are not calling the delete file method. You are not making any sense.
but when if statemnt is true then it is deleting file
and giving status true
theoritciaaly it should delete.What do you mean you checked the filename?
even i chekd the filename before using this delete.it
deletefile is staticmethod in same class whichThe call is in the else block it will not execute if the statement is true (unless you are calling it somewhere else).
executes when if statemnt is true.