Coders Packet

Password generator in Python

By Preetha P

Password generator in Python is implemented using loops and random module. Here, a random password is created in a given length of password.

In this project, the characters are stored as a list using a string module. Now, the user has to enter the length of the password.

Initializing an empty list to store the generated password.

Using loops that iterate till length times, it picks random characters from the list using the random module and appends the random characters to that empty list.

Now, it shuffles them using the shuffle method and it converts the password to string using the join method. Finally, it prints the password.



Download Complete Code


No comments yet

Download Packet

Reviews Report

Submitted by Preetha P (Preetha11)

Download packets of source code on Coders Packet