I want to pass the value of fruit so that I can get it printed as your fruit is apple if apple is selected and your fruit is apple orange if both selected. Maybe I should be using array?
from tkinter import *
from tkinter import ttk
import tkinter as tk
app = tk.Tk()
def show():
fruit=""
if apple.get()==1:
fruit = "apple"
if orange.get()==1:
fruit = "orange"
msg = "your fruit is %s"%fruit
print(msg)
Label(app, text="fruit selected").grid(row=4,column=0, sticky=W)
apple = IntVar()
Checkbutton(app, text="apple", variable=apple,command = show).grid(row=4,column=1, sticky=W)
orange = IntVar()
Checkbutton(app, text="orange", variable=orange).grid(row=4,column=2, sticky=W)
#size
app.title('Basic message')
app.geometry("700x500")
app.mainloop()