I am trying to display seven days from today's date in a Tkinter option menu, but when I run the script only one day gets printed.
When I print as per the code all seven days show in print but not on Tkinter.
from tkinter import *
from datetime import datetime, timedelta
master = Tk()
#Gets date from host computer and prints 7 days
date = datetime.now()
for x in range(7):
d = date - timedelta(days=x)
print(d.strftime("%A %d/%m/%Y"))
#Add the date to the tkinter window
variable = StringVar(master)
variable.set("Select Date") # default value
w = OptionMenu(master, value=d.strftime("%A%d/%m/%Y"),variable= variable)
w.pack()
mainloop()
Using Python 3.