import random checkcode = ‘‘ for i in range(4): if i == random.randint(0,3): current = chr(random.randrange(65,90)) checkcode += str(current) else: checkcode += str(i) print(checkcode)
时间: 2024-12-05 13:28:47
import random checkcode = ‘‘ for i in range(4): if i == random.randint(0,3): current = chr(random.randrange(65,90)) checkcode += str(current) else: checkcode += str(i) print(checkcode)