1 | initial version |

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
```

2 | corrected wording; misread original problem statement |

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
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.