推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Livid
408.15D
539.08D
V2EX  ›  Python

对 random.randrange 的一个试验

  •  
  •   Livid ·
    PRO
    · Dec 6, 2013 · 4565 views
    This topic created in 4737 days ago, the information mentioned may be changed or developed.

    运行结果:

    1: 9.99375%
    2: 10.00486%
    3: 10.01411%
    4: 9.99314%
    5: 9.98705%
    6: 10.00872%
    7: 9.99246%
    8: 10.00895%
    9: 9.99675%
    10: 10.00021%
    4 replies  •  1970-01-01 08:00:00 +08:00
    sethverlo
    sethverlo
    Dec 6, 2013
    1
    1000w 样本不算大啊……
    tioover
    tioover
    Dec 6, 2013
    2
    主要看分布,记得有文章将随即函数分布弄成图片,可以很明显看出真随即和伪随机
    allenforrest
    allenforrest
    Dec 6, 2013
    3
    相当相当的不错了。
    RTNelo
    RTNelo
    Dec 7, 2013
    4
    为何不用 collections.Counter ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1281 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 17:20 · PVG 01:20 · LAX 09:20 · JFK 12:20
    ♥ Do have faith in what you're doing.