相关疑难解决方法(0)

为什么random.shuffle会返回None?

为什么要在python中random.shuffle返回None

>>> x = ['foo','bar','black','sheep']
>>> from random import shuffle
>>> print shuffle(x)
None
Run Code Online (Sandbox Code Playgroud)

如何获得洗牌值而不是None

python random shuffle list

69
推荐指数
4
解决办法
5万
查看次数

标签 统计

list ×1

python ×1

random ×1

shuffle ×1