mirror of
https://github.com/Xevion/tkinter-mini-projects.git
synced 2025-12-05 23:16:36 -06:00
16 lines
281 B
Python
16 lines
281 B
Python
from tkinter import *
|
|
from functools import partial
|
|
import string
|
|
|
|
buttons = list(string.printable)
|
|
print(buttons)
|
|
root = Tk()
|
|
|
|
def txt(text):
|
|
print(text)
|
|
|
|
for b in buttons:
|
|
btn = Button(root, text=b, command=partial(txt, b))
|
|
btn.pack(side=LEFT,pady=5)
|
|
|
|
root.mainloop() |