您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

python random.shuffle的随机性

5b51 2022/1/14 8:22:51 python 字数 1192 阅读 561 来源 www.jb51.cc/python

以下是来自 python网站,关于 random.shuffle(x[, random]) Shuffle the sequence x in place. The optional argument random is a 0-argument function returning a random float in [0.0, 1.0); by default, this is the fun

概述

random.shuffle(x[,random])

Shuffle the sequence x in place. The optional argument random is a 0-argument function returning a random float in [0.0,1.0); by default,this is the function random().

Note that for even rather small len(x),the total number of permutations of x is larger than the period of most random number generators; this implies that most permutations of a long sequence can never be generated.

如果我想重复获得[‘a’…’k’]的随机排列,似乎随机播放不会给我随机性.我的理解是对的吗?

谢谢!

总结

以上是编程之家为你收集整理的python random.shuffle的随机性全部内容,希望文章能够帮你解决python random.shuffle的随机性所遇到的程序开发问题。


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶