How to output a variable inside a Listbox in Tkinter
<p>I've looked up on the net different guides on how to do what I want to, but i didn't find any solution that I could understand.
What I want to do is to display the content stored in any variable in a Listbox in Tkinter.</p>

<pre><code>#! /usr/bin/env python

from tkinter import *

window = Tk()

test = Listbox(window, width=28, heigh=10, font=("Helvetica", 14), state="disabled")
test.grid(row=0, column=0)

for x in range(30):
    test.insert(END, x)

window.mainloop()
</code></pre>

<p>If you think the best solution to my problem would be reached with something different from a Listbox it's fine anyway.
Thank you in advance</p>

<p>Your listbox is disabled, which means you can't insert or delete items. Set the state to <code>"normal"</code> before inserting.</p>

python tkinter