Can someone please help me understand why my while loop is not printing what I intend?
My code creates a tkinter window with a specified number of labels. It should then create the same amount of entry boxes. It does both of these.
If I print the part_number variable it prints as intended: "Part 1", "Part 2", "Part 3". etc.
If I print the entry variable it returns: ".!entry", ".!entry1", ".!entry2", etc where it should print "part_entry1", "part_entry2", "part_entry3". etc.
Thanks for the help.
from tkinter import *
main = Tk()
main.title('Job Logger')
main.geometry("850x750")
'''''''''
def submit():
a = part_entry1.get()
#b = part_entry2.get()
#c = part_entry3.get()
print(a)
#print(b)
#print(c)
'''
count = 0
x = 50
y = 30
x2 = 150
while count < 3:
part_number = ('Part ' + (str(count + 1)))
Label(main, text=part_number).place(x = x, y = y)
entry = ('part_entry' + (str(count + 1)))
entry = Entry(main)
entry.place(width=120, x=x2, y=y)
y += 30
count += 1
print(part_number)
print(entry)
'''''''''
Button(main, text="Submit Run info", command=submit).place(width=100, x=375, y=200)
'''
mainloop()