{
    "mode": "pydoc",
    "parameter": "_random",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/_random/json",
    "generated": "2026-06-02T15:48:31Z",
    "sections": {
        "NAME": {
            "content": "random - Module implements the Mersenne Twister random number generator.\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.object\nRandom\n",
            "subsections": [
                {
                    "name": "class Random",
                    "content": "|  Random() -> create a random number generator with its own internal state.\n|\n|  Methods defined here:\n|\n|  getrandbits(self, k, /)\n|      getrandbits(k) -> x.  Generates an int with k random bits.\n|\n|  getstate(self, /)\n|      getstate() -> tuple containing the current state.\n|\n|  random(self, /)\n|      random() -> x in the interval [0, 1).\n|\n|  seed(self, n=None, /)\n|      seed([n]) -> None.\n|\n|      Defaults to use urandom and falls back to a combination\n|      of the current time and the process identifier.\n|\n|  setstate(self, state, /)\n|      setstate(state) -> None.  Restores generator state.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n"
                }
            ]
        },
        "FILE": {
            "content": "(built-in)\n\n",
            "subsections": []
        }
    },
    "summary": "random - Module implements the Mersenne Twister random number generator.",
    "flags": [],
    "examples": [],
    "see_also": []
}