# Revision history [back]

Here's a python solution.

from random import shuffle
a=['a','b','c','d','e','f','g','h','i','j','k','l']
n=len(a)/6
shuffle(a)
results=[[a[i] for i in range(j*6,j*6+6)] for j in range(0,n)]
results


Here's a python solution.way to shuffle students into groups in python. It's not a solution to the problem you've posed, but it's a start.

from random import shuffle
a=['a','b','c','d','e','f','g','h','i','j','k','l']
n=len(a)/6
shuffle(a)
results=[[a[i] for i in range(j*6,j*6+6)] for j in range(0,n)]
results