# Import the required libraries
from tkinter import *
import tkinter as tk
win = Tk()
a = Entry(win)
a.pack()
def click_on_button():
root = Tk()
button = Button(win, text = 'Click me!', command = click_on_button)
for i in range(a):
button2 = Button(win, text = 'Click me!')
button2.pack()
#для проверки , чтобы все работало(кнопка без функции)
root.mainloop()
win.mainloop()