在下面的 arr 中,我想生成以“1”和“2”开头的随机数如何做到这一点..我想总是以“1”和“2”开头,其余的可以是随机的
example output : 123456789
123478956
124568973
123789456
arr=["1","2","3","4","5","6","7","8","9"]
for i in range(50):
lines = random.sample(arr, 9) //I want always to start with "1" and "2" and the rest can be random
print "%s"%''.join(lines)