==random 模块== "Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin." - John von Neumann, 1951 ``random`` 模块包含许多随机数生成器. 基本随机数生成器(基于 Wichmann 和 Hill , 1982 的数学运算理论) 可以通过很多方法访问, 如 [Example 2-29 #eg-…
== re 模块== "Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems." - Jamie Zawinski, on comp.lang.emacs ``re`` 模块提供了一系列功能强大的正则表达式 (regular expression) 工具, 它们允许你快速检查给定字符串是否与给定的模式匹配…