Using a for loop to create a list of buttons, and when clicked the button updates it's text to say "unavailable". My code below will only update the latest button, and not the one specified
from tkinter import *
root = Tk()
list = ["button 1 available", "button 2 available", "button 3 available"]
def update(item):
btn["text"] = item.replace("available", "unavailable")
for item in list:
btn = Button(root, text=item, command=lambda : update(item))
btn.pack()
root.mainloop()