gui programming iii here is simple example that ties two labels to the same stringvar there is also button that when clicked will alternate the value of the stringvar (and hence the text in the labelsfrom tkinter import def callback()global count set'goodbye if count% == else 'hello 'count += root tk(count stringvar( set'hello 'label label(textvariable swidth= label label(textvariable swidth= button button(text 'click me 'command callbacklabel grid(row= column= label grid(row= column= button grid(row= column= mainloop( more with guis we have left out quite lot about tkinter see lundh' introduction to tkinter [ for more tkinter is versatile and simple to work withbut if you need something more powerfulthere are other third-party guis for python