Python
0
Вклад в тег
import string
import random
#согласные
consonants = ['B', 'C', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q',
'R', 'S', 'T', 'V', 'W', 'X', 'Z']
#гласные
vowels = ['A', 'E', 'I', 'O', 'U', 'Y']
def id_generator():
consonants_list = []
vowels_list = []
new_list = []
for i in range(3):
consonants_list.append(random.choice(consonants))
for i in range(2):
vowels_list.append(random.choice(vowels))
a = 0
b = 0
for i in range(2,7):
if i%2 == 0:
new_list.append(consonants_list[a])
a += 1
else:
new_list.append(vowels_list[b])
b += 1
return "".join(new_list)