If I have a set like so:
s = set(range(1,100))
How might I randomly generate a subset of s containing k distinct elements?
s
k
Aucun commentaire:
Enregistrer un commentaire