#random ten passwords with the width 8 from random import * def Achr(): a1=chr(randint(65,90)) return a1 def achr(): a2=chr(randint(97,122)) return a2 def numb(): a3=randint(0,9) return str(a3) def password(): pw=[] for i in range(8): a4=randint(1,3) if a4==1: pw.append(Achr()) elif a4==2: pw.append(achr()) else : pw.append(numb()) return pw if __name__=='__main__': print ('password:') for i in range(10): pw1=password() print(pw1)