Login Register






Password Generator filter_list
Author
Message
RE: Password Generator #6
Why are you using os functions to open/close? Just recursively call a function with all the generation code in it if the user wants another password.

Instead of random.choice(chars) do

Code:
chr(random.randint(94) + 32 )

It is faster, uses less code, and looks neater.

(94 printable english characters in ascii, they start at 32)

Reply





Messages In This Thread
Password Generator - by Equinox - 01-26-2014, 08:31 AM
RE: Password Generator - by Eclipse - 01-26-2014, 09:58 AM
RE: Password Generator - by Equinox - 01-26-2014, 09:59 AM
RE: Password Generator - by Eclipse - 01-26-2014, 10:19 AM
RE: Password Generator - by Equinox - 01-26-2014, 03:40 PM
RE: Password Generator - by w00t - 01-26-2014, 06:17 PM
RE: Password Generator - by cr33pyguy - 01-26-2014, 08:19 PM
RE: Password Generator - by Equinox - 01-27-2014, 01:22 AM
RE: Password Generator - by cr33pyguy - 01-27-2014, 01:03 PM
RE: Password Generator - by 3SidedSquare - 01-26-2014, 09:02 PM
RE: Password Generator - by TheHelper - 01-26-2014, 09:15 PM
Re: RE: Password Generator - by Equinox - 01-27-2014, 03:19 PM