![]() ![]() First loop will generate a string of length 4 which is a combination of an uppercase letter, a lowercase letter, digits, and a special symbol and that string will store in password variable.pass_str is a string type variable that stores the generated password.Password = password + random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits + string.punctuation) Password = random.choice(string.ascii_uppercase) + random.choice(string.ascii_lowercase) + random.choice(string.digits) + random.choice(string.punctuation) Function to Generate Password pass_str = StringVar() Spinbox() widget is used to select from a fixed number of values.To select the password length we use Spinbox() widget. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |