title: Python v3 ( Random password generator )
body: <p>My question is: how to generate a random password with a  length that varies from (8 to 12 characters) each time generated. </p>
  
  <p>This is my code: </p>
  
  <pre><code>import string
  import random
  
  def randompassword():
      chars=string.ascii_uppercase + string.ascii_lowercase + string.digits
      size=8 
      return ''.join(random.choice(chars) for x in range(size,12))
  
  print(randompassword())
  </code></pre>