1. Random Module In python, the function random() can not be directly called. However, we need to import a random module and generate random numbers by calling the static method. By importing this random module, it implements pseudo-random number generators for various distributions.