You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
415 B
15 lines
415 B
import random
|
|
import string
|
|
|
|
def generate_open_id(length=28):
|
|
# 定义可用的字符集,包括大小写字母和数字
|
|
char_set = string.ascii_letters + string.digits
|
|
# 使用random.choices随机选择length个字符
|
|
return ''.join(random.choices(char_set, k=length))
|
|
|
|
# 生成两个OpenID
|
|
open_id1 = generate_open_id()
|
|
open_id2 = generate_open_id()
|
|
|
|
print(open_id1)
|
|
print(open_id2) |