Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

choice without replacement python

import numpy as np

# choosing 2 random items without replacement - no repetition.
exampleList = ['a', 'b', 'c']
sampled_list = np.random.choice(exampleList, 2, replace=False)
 
PREVIOUS NEXT
Tagged: #choice #replacement #python
ADD COMMENT
Topic
Name
1+1 =