vendredi 11 janvier 2019

how to random generate a sequence of list that are unobserved before in python 3

Assume I have the code in Python 3

X, Y, Z = 10, 20, 30
data = [[1,3,6],[8,15,29],[8,9,19]] # observe data

Then how can I random generate n data elements that are not in the data.

Condition: the element [a,b,c] must be not in data and 0<a<X, 0<b<Y, 0<c<Z

[1,3,5] is good since it is not in data and its element satisfy the Condition

[11,3,6] is bad since it does not satisfy the Condition, 11>10




Aucun commentaire:

Enregistrer un commentaire