#!/usr/bin/python import random def haoma(): ww = [3,7,9,10,5,8,4,2]#suan fa yin zi cc = [] dd=0 for i in range(8):#gei CC fu zhi cc.append(random.randint(1,9)) dd = dd+cc[i]*ww[i] for i in range(len(cc)): cc[i]=str(cc[i]) C9=11-dd%11 if C9==10: C9='
转自: https://blog.csdn.net/warrah/article/details/69338912 https://blog.csdn.net/qq_37142340/article/details/80695187 https://blog.csdn.net/u013361668/article/details/51595169 https://blog.csdn.net/feiyunw/article/details/83190319 import re class Unif