password generator

Creates x amount of passwords at x length depending on the user inputs


import random def exercise_11(): alphabet = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" pw_length = int(input("how long do you want your password to be?")) quantity = int(input("how many passwords do you want to generate?")) for i in range(quantity): mypw = "" for i in range(pw_length): next_index = random.randrange(len(alphabet)) mypw = mypw + alphabet[next_index] print(mypw)
1