(*args)
For every path in args, try to delete it as a file or a directory
    tree. Ignores deletion errors.
For every path in args, try to delete it as a file or a directory
    tree. Ignores deletion errors.
For every path in args try to delete it as a file or a directory tree . Ignores deletion errors .
def delete_file_or_tree(*args):
    """
    For every path in args, try to delete it as a file or a directory
    tree. Ignores deletion errors.
    """

    for f in args:
        try:
            os.unlink(f)
        except OSError:
            shutil.rmtree(f, ignore_errors=True)
def delete_file_or_tree ( * args ) : for f in args : try : os . unlink ( f ) except OSError : shutil . rmtree ( f , ignore_errors = True )