#coding:utf-8 #利用python生成一个随机10位的字符串 import string import random import re list = list(string.lowercase + string.uppercase) + [ str(i) for i in range(10)] FH = ('!','@','#','$','%','&','_') for f in FH: list.append(f) num = random.sample(list,10) '''…