import random
lk = list()
for x in range(0, 1000000):
k = random.randint(100000, 100000000)
lk.append(k)
k = random.sample(lk, 100000)
print(len(k))
dInfo = {}
i = 0
for x in range(0, 100000):
v = []
name = "Jeapedu" + str(k[x])
year = random.randint(1990, 2000)
if x % 5 == 0:
race = 'Meng'
else:
race = 'Han'
import random
lk = list()
for x in range(0, 1000000):
這裏要加do...loop語句
(也不知道python裏面有沒有do...loop語句)
直到隨機生成的k(k = random.randint(100000, 100000000))不在lk裏面,
lk.append(k)