self.cursor.execute('SELECT * FROM Password') rows = self.cursor.fetchall() base_base = StringVar() base_base.set(rows) row_col = len(rows)*3 for i in range(row_col): if podMass==4: podMass-=4 mass+=1 tk.Entry(self, textvariable=base_base[mass][podMass], width =y1, bg="green", justify='center').place(x = x1, y=ordinat) podMass+=1