Password generator code (Python)
Hi everyone!
I have recently learnt about the random module in python. I googled about projects which I could do with it and I saw a suggestive project titled "Password Generator of length 16". So, I wrote the following code:
AND IT WORKED!!! Although it looks pretty lengthy, I am just an intermediate and always looking for suggestions on how to make the code more compact, so comments are definitely welcome! :)
(output)
Now, I wanted to specify the length of the password in the output itself. So, I made the following change (Basically I replaced 16 with the input() statement.)
(new code):
I tested the code with small as well as well as large numbers (even with N=43 ;p {I know that no one would set a password of length 43 but it was fun for real!!})
So some of my many outputs are as follows:
Pretty like the passwords in ZOOM meetings aren't they? XD
Anyways, so that's the end of my first post. I hope you guys liked it.
I will be posting more such projects soon!!
Thank You.
Comments
Post a Comment