I want to delete the file filename if it exists. Is it proper to say
filename
if os.path.exists(filename): os.remove(filename)
Is
This is another solution:
if os.path.isfile(os.path.join(path, filename)): os.remove(os.path.join(path, filename))