code: def delete(to_delete):
      
      if os.path.isfile(to_delete):
          os.remove(to_delete)
      elif os.path.isdir(to_delete):
          shutil.rmtree(to_delete)
docs: Unified "strong" version of delete (remove) for files and directories.
  
      Unified "strong" version of delete that uses `os.remove` for a file and 
      `shutil.rmtree` for a directory tree.
  
      **Parameters**
  
          **to_delete** :  string
  
              Path to a file or directory.
  
      **See Also:**
  
          `os <http://docs.python.org/library/os.html>`_, 
          `shutil <http://docs.python.org/library/shutil.html>`_