title: creating a random password using python and ascii value
body: <p>I wanted to create a program that tells you a random password and check the validity of the password
  I created a random value from 33-126(this are the ascii value that gives output from the keyboard) and then append it to the password and check the validity. but it was doing time-out and no output is given.
  when I debug it then I saw that it was randomly stopping at a random point. the password was in list form to make my work easier. I checked the validity of the password the list (password) was eg- <code>password = ['2', 'f', 'W', '@', '/']</code></p>
  <p>You can see that password[0] is '2' not 2 so I had created to check <code>int type</code> so it was stuck there</p>
  <pre><code>
  def makePassword():
      password = []
      for _ in range(1, random.randint(5, 21)):
          rm = random.randint(33, 126)
          ascii_value = chr(rm)
          password.append(ascii_value)
      return password
  
  
  def isalnum(password):
      password = list(password)
      index = random.randint(0, len(password))
      skw = chr(random.choice([random.randint(48, 57), random.randint(65, 90), random.randint(97, 122)]))
      for i in password:
          if not i.isalnum():
              password.insert(index, skw)
      return password
  
  
  def isalpha(password):
      password = list(password)
      index = random.randint(0, len(password))
      skw = chr(random.choice([random.randint(65, 90), random.randint(97, 122)]))
      for i in password:
          if not i.isalpha():
              password.insert(index, skw)
      return password
  
  
  def isdigit(password):
      password = list(password)
      index = random.randint(0, len(password))
      skw = chr(random.randint(48, 57))
      for i in password:
          if not i.isdigit():
              password.insert(index, skw)
      return password
  
  
  def isupper(password):
      password = list(password)
      index = random.randint(0, len(password))
      skw = chr(random.randint(65, 90))
      for i in password:
          if not i.isupper():
              password.insert(index, skw)
      return password
  
  
  def islower(password):
      password = list(password)
      index = random.randint(0, len(password))
      skw = chr(random.randint(97, 122))
      for i in password:
          if not i.isalnum():
              password.insert(index, skw)
      return password
  
  
  word = makePassword()
  for i in word:
      if not i.isalnum():
          word = isalnum(word)
      if not i.isalpha():
          word = isalpha(word)
      if not i.isdigit():
          word = isdigit(word)
      if not i.isupper():
          word = isupper(word)
      if not i.lower():
          word = islower(word)
  print(word)```
  </code></pre>