How to Make Responsive Button in Python

Using this code you are create responsive button in python. 
  1. #Button2.py  
  2. from tkinter import *  
  3. def click():  
  4.  print("click button!")  
  5. w = Tk() # Create the w(base) window where all widgets go  
  6. w = Label(w, text="Hello, world!"# Create a label with words  
  7. w.pack() # Put the label into the window  
  8. Button1 = Button(w, text="Exit",command=click)  
  9. Button1.pack()  
  10. w.mainloop() # Start the event loop