随机数

65~90  为对应的大写字母

import random

temp =''

for i in range(6):

  num = random.randrange(0,4)

  if num==3 or num ==1:

    rad2= random.randrange(0,10)

    temp = temp + str(rad2)

  else:

    rad=random.randrange(65~90)

    c = chr(rad)

    temp =temp+c

peint(temp)

posted @ 2018-06-26 22:53  黄瓜不是好瓜  阅读(141)  评论(0编辑  收藏  举报