I am trying to create a todolist. The main concept is that I loop over a list of tasks and create labels and buttons like so
for task in todoList:
lbl_task = tk.Label(frame, text=task)
btn_done = ttk.Button(frame, text=task)
Then I pack them onto the frame
My question is how do I access the the name of the task associated with a specific button. I thought of creating a class the inherits ttk.Button but that didn't seem like a clean solution. I wanted to know if there is another way my problem could be solved.