def delete(ToDelete):
if os.path.isfile(ToDelete):<EOL><INDENT>os.remove(ToDelete)<EOL><DEDENT>elif os.path.isdir(ToDelete):<EOL><INDENT>shutil.rmtree(ToDelete)<EOL><DEDENT>
Unified "strong" version of delete.

Uses os.remove for a file and shutil.rmtree for a directory tree.