From the doc of random.shuffle(x[, random]), it says:
The optional argument random is a 0-argument function returning a random float in [0.0, 1.0); by default, this is the function random()
Could someone please explain what 0-argument function
means and give an example of random.shuffle()
with the optional argument random
? I searched but couldn't find any example for that case. Also, what did it mean by this is the function random()
? Does this
refer to the optional argument?
Thank you.
Aucun commentaire:
Enregistrer un commentaire