Let see if this clear it up
import tkinter as tk def create_buttons(): buttons_name = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'] buttons = [] for name in buttons_name: buttons.append(tk.Button(text=name)) return buttons def main(): buttons = create_buttons() for button in buttons: print(button['text']) print('') print('button 3:', buttons[3]['text']) # four will be the answer
99 percent of computer problems exists between chair and keyboard.