How many times have you gone to a site been asked to create an account and they need a password which is both a combination of letters both lower and upper, special keys and numbers. Am sure its several times. Have you been able to do that? or you do use the suggested passwords.
Do you even go a step further and try to think how the suggested passwords are generated, For sometime I wondered too 🤔, but after some research I figured out how. Now I need you to figure it too.
Well its time we change that, what if you could write a code that could generate the passwords you need at once. Won't that be great. Well in this Article am going to show you how you can do that using python.
- Make sure you have a code editor and python installed in your computer.(preferred pycharm)
- Open PyCharm, Click file->New Project. and specify the file or folder location for your work.
- In your folder you just created, you will need to create a python file. Right Click on folder-> New-> Select python file. Give it a name
- Start Coding;
Below is a Code snippet:
import string import random passwrd = string.ascii_letters+string.digits+string.punctuation numPass = int(input("How many passwords do you need to be generated? ")) length = int(input("Enter the length of the password(s): "))
Full Code Link: Here
If You have read this far I really appreciate, Help me to grow my community:
Check out my other Blogs too:
Do share your valuable opinion, I appreciate your honest feedback!
Enjoy Coding ❤