📜  选择不替换python代码示例

📅  最后修改于: 2022-03-11 14:46:52.275000             🧑  作者: Mango

代码示例1
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)