We can delete all items in a treeview widget, regardless if they’re selected or not.
12345
# Get a tuple of all root-level item iid'sall_root_items=treeview_food.get_children()# Delete all root level items, which will automatically delete all their children too.treeview_food.delete(*all_root_items)