title: I am trying to create a password generator and i keep getting this error: "TypeError: can only concatenate tuple (not "str") to tuple"
body: <p>I am a beginner and I am trying to create a random password generator. I get a entry box and a button, but after entering a number(the password length) I get an error, it is supposed to return a password.</p>
  <p>Full error:</p>
  <pre class="lang-none prettyprint-override"><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File &quot;/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py&quot;, line 1921, in __call__
      return self.func(*args)
    File &quot;/Users/denis/PycharmProjects/pythonProject/the first/Things/Random Password Generator.py&quot;, line 19, in password_generator
      random_password += character_list[random.randint(0, 91)]
  TypeError: can only concatenate tuple (not &quot;str&quot;) to tuple
  </code></pre>
  <p>code:</p>
  <pre><code>import random
  from tkinter import *
  from typing import Tuple
  
  root = Tk()
  
  input_box = Entry(root, width=22, borderwidth=2, bg=&quot;#000000&quot;)
  input_box.grid(row=0, column=0, columnspan=2)
  input_box.insert(0, 'Enter the password length:', )
  random_password = ()
  
  def password_generator():
      character_list = (&quot;&quot;&quot;QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm
      1234567890`~!@#$%^&amp;*()_+[]\{}|;':&quot;,./&lt;&gt;?&quot;&quot;&quot;)
      num_of_runs = 1
      random_password = ()
      password_length = int(input_box.get())
      while num_of_runs &lt;= int(password_length):
          random_password += character_list[random.randint(0, 91)]
          num_of_runs += 1
      Label(random_password).grid(row=2, column=0)
  
  
  my_button = Button(root, text=&quot;Click here for your password&quot;, 
                 command=password_generator, fg=&quot;#000000&quot;, bg=&quot;white&quot;, )
  my_button.grid(row=1, column=0, columnspan=2)
  
  root.mainloop()
  </code></pre>