我有一个关于迭代rr给出一些条目的问题。当我运行我的代码时,只显示条目数的条目。如何显示rr的条目?我只是一个初学者...无论如何,我将感谢你的所有评论。
from Tkinter import *
top = Tk()
class userinput:
def __init__ (self):
self.stn = 0
self.bslist = []
self.fslist = []
def station (self):
self.stn = int(E1.get())
def readings (self):
for i in range(self.stn-1):
rr = float(E2.get())
L1 = Label(top, text = "Enter number of entries")
L1.pack()
E1 = Entry(top, bd = 10)
E1.pack()
B1 = Button (top, text = "Enter", command = userinput.readings)
B1.pack()
E2 = Label(top,bd = 10)
E2.pack()
ui = userinput()
ui.readings()
top.mainloop ()