Reputation: 35
import tkinter as tk
window = tk.Tk()
window.geometry("200x200")
options = tk.Label(text = "Text")
for i in range (3):
options.pack()
tk.mainloop()
I want this to print "Text" in the gui, 3 times, on 3 different lines. Any help pls?
Upvotes: 0
Views: 68
Reputation: 96
import tkinter as tk
window = tk.Tk()
window.geometry("200x200")
for i in range (3):
options = tk.Label(window, text="test label")
options.pack()
tk.mainloop()
This will work.
Upvotes: 2