9 lines
210 B
Python
9 lines
210 B
Python
import random
|
|
|
|
def chooseNeighbours(count: int, i: int) -> set:
|
|
neigh = set()
|
|
while len(neigh) < count:
|
|
num = random.randint(0,7)
|
|
if num != i:
|
|
neigh.add(num)
|
|
return neigh |