Python Tkinter Examples
from tkinter import *
from PIL import ImageTk, Image
root = Tk()
root.title('Example of Checkbutton in Python Tkinter')
#root.iconbitmap('c:/img/icon.ico')
root.geometry("400x300")
def func():
label = Label(root, text=var.get()).pack()
var = IntVar()
checkbox = Checkbutton(root, text="My Checkbutton", variable = var)
checkbox.pack()
button = Button(root, text="Show Value of Checkbutton", command=func)
button.pack()
root.mainloop()

Setting onvalue & offvalue of checkbutton
from tkinter import *
from PIL import ImageTk, Image
root = Tk()
root.title('Example of Checkbutton in Python Tkinter')
#root.iconbitmap('c:/img/icon.ico')
root.geometry("400x300")
var = StringVar()
def func():
label = Label(root, text=var.get()).pack()
checkbox = Checkbutton(root, text="My Checkbutton", variable = var, onvalue="Selected", offvalue="Not Selected")
checkbox.pack()
button = Button(root, text="Show Value of Checkbutton", command=func)
button.pack()
root.mainloop()