Tried creating random groups :D. Feel free to play around and make sure you change the seed for new random groups.
import numpy as np
np.random.seed(42)
a = []
groups = []
for r in range(24):
a.append(r+1)
while(len(a) > 4):
group = np.random.choice(a, size=4, replace=False)
groups.append(group)
for member in group:
a.remove(member)
print(groups)
print(a)
print(‘Done!!’)
Groups :
[
array([ 9, 17, 1, 19]),
array([22, 3, 7, 2]),
array([16, 13, 4, 6]),
array([24, 23, 12, 15]),
array([ 5, 10, 14, 18])
]
[8, 11, 20, 21]