Ask coding questions

← Back to all posts
For some some reason this program is not working can someone help?
tyagir2392 (2)

I have been working on this program for a few hours, but now it's not working. Can someone take a look at it, I probably made a mistake since this is only my second tkinter program ,with the first one being a simple calculator.

Comments
hotnewtop
Coder100 (17111)


You need a specifier, like:

' '.join(......)

correct code

def passgen():
  if choice.get() == 1:
    return ''.join(random.sample(POOR, val.get()))
  if choice.get() == 1:
    return ''.join(random.sample(AVERAGE, val.get()))
  if choice.get() == 1:
    return ''.join(random.sample(ADVANCED, val.get()))