import random def v_code(): code = ‘‘ for i in range(5): # if i == random.randint(0,5): # add = random.randrange(10) # else: # add = chr(random.randint(65,91)) add =random.choice([random.randrange(10),chr(random.randint(65,91))]) code += str(add) return code a = v_code() print(a)
原文地址:https://www.cnblogs.com/yujin123456/p/9690424.html
时间: 2024-11-05 19:26:00