How can update this listbox in Tkinter?

I have created a listbox with certain data. Because I want pressing to remove all old data from this listbox and add the new one. How to do it ?
June 5th 19 at 21:16
1 answer
June 5th 19 at 21:18
Converted a piece of an old project. How to update data after cleaning, I hope, will come.
...
 self.textbox = Text(self.root, height=10, width=40, wrap=WORD, state='disabled')
 self.button = Button (self.root, command=self.clear_listbox)
self.button.pack()
self.textbox.configure(state='disabled')
self.textbox.pack()
 self.update("my google-fu is so bad")


 def update(self, text):
self.textbox.configure(state='normal')
 self.textbox.insert(END, text + "\n")
self.textbox.see(END)
self.textbox.configure(state='disabled')

 def clear_listbox(self):
self.textbox.configure(state='normal')
 self.textbox.delete(1.0, END)
self.textbox.configure(state='disabled')
...
And you can, again, write how to update data ? - Olga.Parisian commented on June 5th 19 at 21:21
seriously? please create a separate function which do the first cleaning, and then update and hang it on the button handler. - Lola.Padberg38 commented on June 5th 19 at 21:24
I mean that it is done like: self.list = value ? - Olga.Parisian commented on June 5th 19 at 21:27

Find more questions by tags PythonTkinter