mercredi 20 septembre 2017

Shuffle elements randomly between two list (Python)

I have two lists:

list_1 = [a, b, c, d, e]

list_2 = [f, g, h, i]

What I'm trying to do is a method to shuffe two elements between the list randomly, for example:

shuffle_two_lists(list_1, list_2 )

list_1 = [g, b, c, d, e]

list_2 = [f, a, h, i]

Any suggestion?




Aucun commentaire:

Enregistrer un commentaire