from tkinter import *
import matplotlib.pyplot as plt
win = Tk()
win.geometry("1024x576")
win.title("Minecraft bukkit")
win.option_add("*Font", "NotoSansKR-Medium 20")
ent = Entry(win)
ent.insert(0,"찾을 서버를 입력")
def clear(event):
if ent.get() == "찾을 서버를 입력":
ent.delete(0,len(ent.get()))
ent.bind("<Button-1>", clear)
ent.pack(side = "top")
ent.pack(pady = 50)
SERVER_BUTTONS = 0
CREATING_SERVER = 0
for SERVER_BUTTONS in range(0, CREATING_SERVER, 1):
slot_SERVER_BUTTONS = Button(win)
"""btn = Button(win)
btn.config(text = "서버 추가")
btn.pack(side = "bottom")
btn.pack(pady = 5)
btn['bg'] = "#9bba86"
Button()"""
win.mainloop()
제가 만들던 전체 코드입니다. 이 중
SERVER_BUTTONS = 0
CREATING_SERVER = 0
for SERVER_BUTTONS in range(0, CREATING_SERVER, 1):
slot_SERVER_BUTTONS = Button(win)
이 코드에 관한 질문입니다. for문으로 버튼을 클릭할 때마다, slot 함수가 생기는 것을 만들고 싶은데, SERVER_BUTTONS = 1일 때, slot_1 로 변수가 만들어지면 좋겠습니다.