how to delete all item in treeview tkinter 1

how to delete all item in treeview tkinter

def remove_many():
    x=my_tree.selection()
    for record in x:
        my_tree.delete(record)

Here is what the above code is Doing:
1. We create a function called remove_many()
2. We create a variable called x and set it equal to the selection of the treeview
3. We create a for loop that will loop through each record in x
4. We delete each record in x

Similar Posts