import tkinter as tk
window = tk.Tk()
window.title('window')
window.geometry('500x500')
l=tk.Label(window,bg='yellow',width=20,text='empty')
l.pack()defprint_selection():if(var1.get()==1)and(var2.get()==0):
l.config(text='i love only Python')elif(var1.get()==0)and(var2.get()==1):
l.config(text='i love only C++')elif(var1.get()==0)and(var2.get()==0):
l.config(text='i do not love neither')else:
l.config(text='I love both')
var1=tk.IntVar()
var2=tk.IntVar()# var3=tk.IntVar()
c1 = tk.Checkbutton(window,text='python',variable=var1,onvalue=1,offvalue=0,
command=print_selection)
c2 = tk.Checkbutton(window,text='C++',variable=var2,onvalue=1,offvalue=0,
command=print_selection)# c3 = tk.Checkbutton(window,text='java',variable=var3,onvalue=1,offvalue=0,# command=print_selection)
c1.pack()
c2.pack()
window.mainloop()