dimanche 1 mai 2016

Returning two randomly chosen groups from a list in python

How would i write code that involves having a list of 9 people split as evenly as possible into 2 cars but they are placed into each car randomly in python? Essentially i'm looking for a return similar to this:
Car 1: Person8, Person2, Person4, Person7
Car 2: Person5, Person1, Person3, Person6, Person9




Aucun commentaire:

Enregistrer un commentaire