Hack Forums
[Python] Password Generator with Parameters - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Password Generator with Parameters (/showthread.php?tid=6009180)



Password Generator with Parameters - Chance - Sep 18, 2019

I'm trying to make a password generator program that generates 9 digit strings that all begin with 00. How would I go at this? Thank you!


RE: Password Generator with Parameters - Deno - Sep 18, 2019

try this. https://github.com/pbssubhash/PyPassGen it will be faster if you ask this @ google :)


RE: Password Generator with Parameters - magicparty - Sep 18, 2019

Code
from random import randint

password = "00" + ''.join([str(randint(0,9)) for i in range(7)])

Not sure if I totally understand the question but this will create random string type data all beginning in "00" followed by 7 random numbers where 0 <= number <= 9.

Example: "004929681"