mercredi 17 juin 2020

How to lightly shuffle a list in python

I have this issue where I would like to shuffle a list, but only do so slightly. Say, I want only a small number of elements to be moved. Is there a simple way to get this done?

Right now the best I can think of is building my own method be hand, but is there some way to use the random library to do this for me?




Aucun commentaire:

Enregistrer un commentaire