mardi 6 décembre 2022

Random number assignment to a list value

I need to assign a random number to each value of a list of str. The number must be between 1 and len(list). I can't figure out how to make the numbers not to repeat.

I managed to assign a number to each value but I can't get the numbers to be unique and not repeat themselves.This is what I've got so far.




Aucun commentaire:

Enregistrer un commentaire