from random import Random

lefthand="789yuiophjklbnmYUIOPHJKLBNM"
righthand="123456qwertyasdfgzxcvQWERTYASDFGZXCV"
allchars=lefthand+righthand


def GeneratePwd(leng=8, alt=False):
   rng = Random()
   pwd=""
   for i in range(leng):
      if not alt:
         pwd+=rng.choice(allchars)
      else:
         if i%2:
            pwd+=rng.choice(lefthand)
         else:
            pwd+=rng.choice(righthand)
   return pwd
