A framework is what the word says a frame where you work. This frame has conventions that you should follow but a lot of conveniences as well. Generally speaking for any project that is not tiny it is best to be build up in any published framework (with tutorials, and guidebook) than without one. But … if you are new to programming (and not only in PHP) than don’t think of frameworks yet.
First be acquainted of the programming way of thinking, the concepts and how things are done in a language or two and then consider using a framework. If you move from the start to a framework you will be just a user of it and not a programmer. That is just my opinion, hoped I help…
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: