lundi 3 avril 2017

Python- How to form a random partition of 2 lists

Does anyone know how to form a random partition of 2 lists (List1 and List2) in python? The lists do not have to have the same size. For example:

S = [1,2,3,4,5,6,7]
List1=[3,6,1,2]
List2=[5,4,7]

or

List1 =[3,5]
List2=[1,2,4,7,6]




Aucun commentaire:

Enregistrer un commentaire