Ich habe dieses Python-Skript, was ist die Verwendung von config()
im Python-Tkinter-Modul?Dienstprogramm von Config() in Python Tkinter
from tkinter import *
root=Tk()
def sel():
s=v.get()
if s=="m":
l.config(text="CORRECT ANSWER!!!")
else:
l.config(text="WRONG ANSWER")
v=StringVar()
a=Label(root,text="Delhi is the capital of India.",bg="wheat",fg="blue")
a.pack()
r1=Radiobutton(root,text="True",variable=v,value="m",command=sel)
r1.pack(anchor=W)
r2=Radiobutton(root,text="False",variable=v,value="n",command=sel)
r2.pack(anchor=W)
l=Label(root,bg="ivory",fg="darkgreen")
l.pack()
root.mainloop()
Haben Sie irgendwelche Grundlagenforschung, wie das Lesen einiger Dokumentation getan? –