Answers for "choice without replacement python"

0

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)
Posted by: Guest on September-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language