import random
import numpy as np
box = ['a','b','c','d']
result = []
for i in range(1000):
q = np.random.choice(box,size=4,replace =False)
w= list(q)
e = w.index('c')
r = w.index('d')
if abs(e-r) == 1:
result.append(tuple(q))
result2= set(result)
12번
다음검색