I have two lists a and b with same length as below
a = [1,2,3,4,5]
b = [11,22,33,44,55]
How can i choose elements in a using random.choices such that exact corresponding items in b are also picked.
Both a and b will always be of same length. and both the elements of a and b are related based on index. so, in short, what i am trying to do is randomly select an element in a and then be able to pick the corresponding element in b. One thing is that the elements might be repeated.
Aucun commentaire:
Enregistrer un commentaire