Python 生成随机用户名函数
def ycx(n=4): import random import string username = '' for i in range(n): if i == 0: username += random.choice(string.ascii_lowercase + '') else: username += random.choice(string.ascii_lowercase + string.digits + '') return username
print(ycx()) print(ycx(6))
原文地址: https://www.cveoy.top/t/topic/nhAi 著作权归作者所有。请勿转载和采集!