только начал изучать python.Не могу присвоить значения переменным a и b
import random
import tkinter as tk
from tkinter import Tk
root = tk.Tk()
root.geometry('300x300+300+300')
l3 = tk.Label(root, text='Пароли')
l3.pack()
lb1 = tk.Listbox(root, width=40)
lb1.pack()
chars = '+-/*!&$#?=@<>abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
def generator():
a = 3
b = 12
lb1.delete(0, 'end')
if a and b:
for n in range(a()):
password = ''
for i in (b()):
password += random .choice(chars)
lb1.insert(0,password)
print(password)
def copy_to_clipboard(event):
print(event.widget.get('active'))
root.clipboard_clear()
root.clipboard_append(event.widget.get('active'))
root.update()
b1 = tk.Button(root, text='Создать', command=generator)
b1.pack()
lb1.bind('<Button-1>', copy_to_clipboard)
root.mainloop()