May-12-2020, 06:31 PM
Hello,
I'm totally new in programming in python.
I'm planning to write a sudoku solver in python. I have a frame with 81 entries on it and I want to read the values of each entry with '.get()'.
Therefore I got a list with all entries and I want to apply the command '.get()' to each element of the list. How that could be done?
Thanks a lot for your help!!
Greetings, flash77
I'm totally new in programming in python.
I'm planning to write a sudoku solver in python. I have a frame with 81 entries on it and I want to read the values of each entry with '.get()'.
Therefore I got a list with all entries and I want to apply the command '.get()' to each element of the list. How that could be done?
Thanks a lot for your help!!
Greetings, flash77
import tkinter as tk fenster = tk.Tk() fenster.geometry("500x540") fenster.resizable(width=0, height=0) l=tk.Label(fenster, text="Sudoku Solver") l["font"]="Arial" l.place(x=240,y=0) def tboxErzeugen(): for i in range(0, 360, 40): for j in range(0, 360, 40): t= tk.Entry(fenster, font=("Times New Roman",12)) t.place(x=i+70, y=j+80, width=40, height=40) def test(a): if type(a)==tk.Entry: return True else: return False tboxErzeugen() b=tk.Button(fenster, text="einlesen", command = test) b.place(x=50,y=450) w = [] w = fenster.winfo_children() u = filter(test,w) e = [] for i in u: print("True:",i) e.append(i) print(e) fenster.mainloop()