Although the Eli Courtwright program will work fine¹ , what you really want is just a way to reconfigure after creating an instance any attribute that you could set when creating the instance², How do you do this using the configure () method.
from Tkinter import Tk, Button
def goodbye_world():
print "Goodbye World!\nWait, I changed my mind!"
button.configure(text = "Hello World!", command=hello_world)
def hello_world():
print "Hello World!\nWait, I changed my mind!"
button.configure(text = "Goodbye World!", command=goodbye_world)
root = Tk()
button = Button(root, text="Hello World!", command=hello_world)
button.pack()
root.mainloop()
¹ "", ; [] [] , ( ) . command .configure .
² , , name.