import random
#获得所有的大写字母:
upperCharacter= []
for i in range(65, 91):
upperCharacter.append(chr(i))
upperCharacter.remove('O')
upperCharacter.remove('I')
upperCharacter.remove('Z')
upperCharacter.remove('S')
upperCharacter.append('3')
upperCharacter.append('4')
upperCharacter.append('6')
upperCharacter.append('7')
upperCharacter.append('8')
upperCharacter.append('9')
image = ''
for i in range(1,9):
image = image+random.choice(upperCharacter)
print(image)
M9PME6BA
import random
def getCode(resouce):
return ''.join()
resouce = '346789ABCDEFGHJKLMNPQRTUVWXY'
for i in range(10):
print(getCode(resouce))
>>> ================================ RESTART ================================
>>>
7LQ9TTC7MGJN
XNNGCTGJNE9X
XMU6VY3CW4MD
FLF433DT9E4X
E6B4D8R38JJW
4C6TT4CCF7RQ
3CCLFQNKG7PD
LLR9MKQ8HP8E
HTCJFJWPMVJX
9LC699UXKQ67
import random
st = '346789ABCDEFGHJKLMNPQRTUVWXY'
lis = random.sample(st, 12)
print(''.join(lis))
import random
def calc():
num =
num.extend(["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"])
while True:
random.shuffle(num)
num1 = num[:12]
if ("O" in num1 and "0" in num1) or ("1" in num1 and "I" in num1) or ("2" in num1 and "Z" in num1) or ("5" in num1 and "S" in num1):
continue
else:
return num1
pass
calc()
#help(random)
import random as r
def fun111():
temp = '346789ABCDEFGHJKLMNPQRTUVWXY'
return ''.join( for i in range(12)])
if __name__ == '__main__':
print(fun111())
from random import randint
l=['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'V', 'W', 'X', 'Y', '3', '4', '6', '7', '8', '9']
def func(length):return ''.join((lfor _ in range(length)))
本帖最后由 kinkon 于 2022-3-7 16:05 编辑
import random
P = 'ABCDEFGHJKLMNPQRTUVWXY346789'
ans = ''
for _ in range(12):
ans += random.choice(P)
print(ans)
print(''.join())