python random sample_Python的例外随机样例(Python random sample with exception)
Python的例外随机样例(Python random sample with exception)我试图创建myList的示例,但i_除外。我的尝试:i_ = 'd'myList = ['a','b','c','d','e']myList = random.sample(myList, 3)虽然上面的示例工作正常,但仍有可能从myList删除i_ 。我想创建一个没有删除i_值的示例。期望的输出:...