import random for i in range(10):#自己选择密码的长度 b=[random.randint(48,57),random.randint(65,90),random.randint(97,122)]#随机的列表 n=random.randint(0,2) print("{}".format(chr(b[n])),end='')