How do you generate a random list of lists? I can generate a random list using the following [random.sample(range(80), 20)]
.
You can use the *
function to make it list of lists but the numbers aren't random for each list. I can find answers relating to the creation of random list of lists that produce variable lengths but I can't find anything that will produce random numbers with the same length.
Aucun commentaire:
Enregistrer un commentaire