📅  最后修改于: 2022-03-11 14:45:55.964000             🧑  作者: Mango
>>> import string
>>> import random
>>> def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))