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)
View Code

相关文章:

  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
猜你喜欢
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2021-12-21
  • 2022-02-08
相关资源
相似解决方案