title: How to repeat an action in python to make my code simpler
body: <p>Im trying to make my code repeat the action of picking a random symbol in a string multiple times. The code below essentially repeats a letter picked 6 times like this "DDDDDD" instead of the desired result of "DYBDdsf" for example. Im trying to create a password gen for my first project. The user input is an arbitrary number for now as I'm still in the process of learning Tkinter.</p>
  
  <pre><code>import string
  
  string.ascii_letters='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
  string.number_symbols='!@#$%^&amp;*()'
  
  userInput = 6
  
  print((random.choice(string.ascii_letters))* userInput)
  </code></pre>