1. 程式人生 > >簡單的驗證碼程序

簡單的驗證碼程序

current int bin 字母 randint ren tmp Coding 簡單

#!/usr/bin/env python #-*-coding=utf-8 -*- #AUTHOR:duwentao import random chechkcode = '' for i in range(4): current = random.randrange(0,4) #字母 if current == i: tmp = chr(random.randint(65,90)) #數字 else: tmp = random.randint(0,9) chechkcode += str(tmp) print(chechkcode)


簡單的驗證碼程序