x_list = ['a', 'b', 'c', 'd', 'e']
t_list = ['z', 'y', 'u']
I want replace elements of t_list with elements of x_list, "randomly". I researched and I tried something but replace() didn't work for lists. For example; x_new0 = ['a', 'z', 'c', 'y', 'u], x_new1 = ['z', 'y', 'c', 'd','u']. How can I do this?
Aucun commentaire:
Enregistrer un commentaire