Describe:
A simple trainee into a verification code or password of small script, the verification code is widely used in the web of random authentication module, can also be slightly
The effect of randomly generated passwords. Take a look at the code:
Code:
def getcode (num): code = ' For I in range (num): w = Random.choice ([Chr (Random.randrange), Random.ran Drange (Ten)]) code + = str (w) return code
Effect:
650) this.width=650; "title=" 11111111111111111.png "src=" https://s5.51cto.com/oss/201711/10/ 8ec1aea6d75feb51cbfb10773672916b.png-wh_500x0-wm_3-wmp_4-s_587471413.png "alt=" 8ec1aea6d75feb51cbfb10773672916b.png-wh_ "/>
A few simple steps to generate a random verification code function module is complete. You can also change the password to randomly generate a location.
This article is from the "Learning, learning" blog, please be sure to keep this source http://dyc2005.blog.51cto.com/270872/1980610
Python Quick Generate verification code (password)