def delete_file(path, fileName=None):
 if fileName:
  path = os.path.join(path, fileName)
 if os.path.isfile(path):
  os.remove(path)

def delete_file ( path , fileName = None ) : if fileName : path = os . path . join ( path , fileName ) if os . path . isfile ( path ) : os . remove ( path )
delete file from public folder .