📅  最后修改于: 2022-03-11 14:46:52.275000             🧑  作者: Mango
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)