Python Random Module Examples


Python Random Package Examples

Python random module is used to generate a random number whose selection could be uniform, normal, lognormal, etc.

Python random module has pseudo-random number generators for different kinds of distributions.


List of Examples

In this series of Python Examples, we will learn how to use Python Random Module for different applications.

  1. Python - Generate random number
  2. Python - Generate random number of specific length
  3. Python - Generate random string of specific length
  4. Python - Generate random float
  5. Python - Generate random Float based on Gaussian Distribution
  6. Python - Generate random Float based on Normal Distribution
  7. Python - Generate random Float based on Exponential Distribution
  8. Python - Choose random element from a sequence
  9. Python - Choose list of random elements from a sequence
  10. Python - Generate random password
  11. Python - Flip a coin

Summary

In this tutorial of Python Examples, we learned how to use random package for some of the scenarios in real time Python programming.




Python Libraries