René's URL Explorer Experiment


Title: Generating Random Data in Python (Guide) – Real Python

Open Graph Title: Generating Random Data in Python (Guide) – Real Python

Description: You'll cover a handful of different options for generating random data in Python, and then build up to a comparison of each in terms of its level of security, versatility, purpose, and speed.

Open Graph Description: You'll cover a handful of different options for generating random data in Python, and then build up to a comparison of each in terms of its level of security, versatility, purpose, and speed.

Mail addresses
?subject=Python article for you&body=Generating Random Data in Python (Guide) on Real Python https://realpython.com/python-random/

Opengraph URL: https://realpython.com/python-random/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Generating Random Data in Python (Guide)",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/random_data_watermark.576078a4008d.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python-random/",
    "lastReviewed": "2023-06-09",
    "author": {
      "@type": "Person",
      "name": "Brad Solomon",
      "image": "https://realpython.com/cdn-cgi/image/width=1188,height=1188,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Screen_Shot_2021-09-28_at_3.13.21_PM.3310c56e90bd.jpg",
      "url": "https://realpython.com/team/bsolomon/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Adriana Cutenco",
        "image": "https://realpython.com/cdn-cgi/image/width=900,height=900,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/acutenco.676e4197c133.jpg",
        "url": "https://realpython.com/team/acutenco/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Geir Arne Hjelle",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/gahjelle.470149ee709e.jpg",
        "url": "https://realpython.com/team/gahjelle/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Joanna Jablonski",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/jjablonksi-avatar.e37c4f83308e.jpg",
        "url": "https://realpython.com/team/jjablonski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2018-07-11T14:00:00+00:00",
  "dateModified": "2023-06-09T15:41:56.395518+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Brad Solomon",
    "image": "https://realpython.com/cdn-cgi/image/width=1188,height=1188,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Screen_Shot_2021-09-28_at_3.13.21_PM.3310c56e90bd.jpg",
    "url": "https://realpython.com/team/bsolomon/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "You'll cover a handful of different options for generating random data in Python, and then build up to a comparison of each in terms of its level of security, versatility, purpose, and speed."
}

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/random_data_watermark.576078a4008d.jpg
og:imagehttps://files.realpython.com/media/random_data_watermark.576078a4008d.jpg
twitter:creator@realpython
og:typearticle

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python-random/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/python-random/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Fpython-random%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics
Intermediatehttps://realpython.com/search?level=intermediate
Advancedhttps://realpython.com/search?level=advanced
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python-random/#toc
How Random Is Random?https://realpython.com/python-random/#how-random-is-random
What Is “Cryptographically Secure?”https://realpython.com/python-random/#what-is-cryptographically-secure
What You’ll Cover Herehttps://realpython.com/python-random/#what-youll-cover-here
PRNGs in Pythonhttps://realpython.com/python-random/#prngs-in-python
The random Modulehttps://realpython.com/python-random/#the-random-module
PRNGs for Arrays: numpy.randomhttps://realpython.com/python-random/#prngs-for-arrays-numpyrandom
CSPRNGs in Pythonhttps://realpython.com/python-random/#csprngs-in-python
os.urandom(): About as Random as It Getshttps://realpython.com/python-random/#osurandom-about-as-random-as-it-gets
Python’s Best Kept secretshttps://realpython.com/python-random/#pythons-best-kept-secrets
One Last Candidate: uuidhttps://realpython.com/python-random/#one-last-candidate-uuid
Why Not Just “Default to” SystemRandom?https://realpython.com/python-random/#why-not-just-default-to-systemrandom
Odds and Ends: Hashinghttps://realpython.com/python-random/#odds-and-ends-hashing
Recaphttps://realpython.com/python-random/#recap
Additional Linkshttps://realpython.com/python-random/#additional-links
https://realpython.com/feedback/survey/article/python-random/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python-random/disliked/?from=article-sidebar
Generating Random Data in Pythonhttps://realpython.com/courses/generating-random-data-python/
Brad Solomonhttps://realpython.com/python-random/#author
https://realpython.com/python-random/#reader-comments
intermediatehttps://realpython.com/tutorials/intermediate/
data-sciencehttps://realpython.com/tutorials/data-science/
pythonhttps://realpython.com/tutorials/python/
How Random Is Random?https://realpython.com/python-random/#how-random-is-random
What Is “Cryptographically Secure?”https://realpython.com/python-random/#what-is-cryptographically-secure
What You’ll Cover Herehttps://realpython.com/python-random/#what-youll-cover-here
PRNGs in Pythonhttps://realpython.com/python-random/#prngs-in-python
The random Modulehttps://realpython.com/python-random/#the-random-module
PRNGs for Arrays: numpy.randomhttps://realpython.com/python-random/#prngs-for-arrays-numpyrandom
CSPRNGs in Pythonhttps://realpython.com/python-random/#csprngs-in-python
os.urandom(): About as Random as It Getshttps://realpython.com/python-random/#osurandom-about-as-random-as-it-gets
Python’s Best Kept secretshttps://realpython.com/python-random/#pythons-best-kept-secrets
One Last Candidate: uuidhttps://realpython.com/python-random/#one-last-candidate-uuid
Why Not Just “Default to” SystemRandom?https://realpython.com/python-random/#why-not-just-default-to-systemrandom
Odds and Ends: Hashinghttps://realpython.com/python-random/#odds-and-ends-hashing
Recaphttps://realpython.com/python-random/#recap
Additional Linkshttps://realpython.com/python-random/#additional-links
Remove adshttps://realpython.com/account/join/
Generating Random Data in Pythonhttps://realpython.com/courses/generating-random-data-python/
stringshttps://realpython.com/python-strings/
https://realpython.com/python-random/#how-random-is-random
dice-o-matichttps://hackaday.com/2009/05/26/dice-o-matic/
(Source)https://bit.ly/2dUfzGb
(Source)https://docs.python.org/3/library/random.html
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-random/#what-is-cryptographically-secure
modulehttps://github.com/python/cpython/blob/78392885c9b08021c89649728053d31503d8a509/Lib/secrets.py#L33
octethttps://en.wikipedia.org/wiki/Octet_(computing)
variablehttps://realpython.com/python-variables/
https://realpython.com/python-random/#what-youll-cover-here
statistical modelinghttps://realpython.com/python-statistics/
numpy.randomhttps://realpython.com/numpy-random-number-generator/
https://realpython.com/python-random/#prngs-in-python
https://realpython.com/python-random/#the-random-module
Mersenne Twisterhttps://github.com/python/cpython/blob/master/Modules/_randommodule.c
defaulthttps://github.com/python/cpython/blob/78392885c9b08021c89649728053d31503d8a509/Lib/random.py#L93
continuous uniform distributionhttps://en.wikipedia.org/wiki/continuous_uniform_distribution
list or a tuplehttps://realpython.com/python-lists-tuples/
make a copy firsthttps://realpython.com/copying-python-objects/
copyhttps://docs.python.org/library/copy.html
while loophttps://realpython.com/python-while-loop/
stringhttps://docs.python.org/3/library/string.html
this Stack Overflow answerhttps://stackoverflow.com/a/48421303/7954504
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-random/#prngs-for-arrays-numpyrandom
list comprehensionhttps://realpython.com/list-comprehension-python/
numpy.randomhttps://docs.scipy.org/doc/numpy/reference/routines.random.html
NumPy arrayshttps://realpython.com/numpy-array-programming/
i.i.d.https://en.wikipedia.org/wiki/Independent_and_identically_distributed_random_variables
How to Get Normally Distributed Random Numbers With NumPyhttps://realpython.com/numpy-random-normal/
Boolean valueshttps://realpython.com/python-boolean/
view-casthttps://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.view.html
correlated datahttps://realpython.com/numpy-scipy-pandas-correlation-python/
multivariate_normal()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.multivariate_normal.html#numpy.random.multivariate_normal
multivariate normalhttps://en.wikipedia.org/wiki/Multivariate_normal
correlationhttps://en.wikipedia.org/wiki/correlation
https://files.realpython.com/media/scalar_equation.2ef9746c8834.jpg
into matrix formhttps://blogs.sas.com/content/iml/2010/12/10/converting-between-correlation-and-covariance-matrices.html
https://files.realpython.com/media/matrix_equation.d70f9fd73960.jpg
rand()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.rand.html#numpy.random.rand
random_integers()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.random_integers.html#numpy.random.random_integers
randint()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randint.html#numpy.random.randint
uniform()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.uniform.html#numpy.random.uniform
choice()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.choice.html#numpy.random.choice
choice()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.choice.html#numpy.random.choice
choice()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.choice.html#numpy.random.choice
shuffle()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.shuffle.html#numpy.random.shuffle
normal()https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.normal.html#numpy.random.normal
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-random/#csprngs-in-python
https://realpython.com/python-random/#osurandom-about-as-random-as-it-gets
os.urandom()https://docs.python.org/library/os.html#os.urandom
secretshttps://github.com/python/cpython/blob/b225cb770fb17596298f5a05c41a7c90c470c4f8/Lib/secrets.py#L47
uuidhttps://github.com/python/cpython/blob/b225cb770fb17596298f5a05c41a7c90c470c4f8/Lib/uuid.py#L621
Wikipediahttps://en.wikipedia.org/wiki//dev/random
CryptGenRandom()https://msdn.microsoft.com/en-us/library/windows/desktop/aa379942(v=vs.85).aspx
byteshttps://docs.python.org/library/stdtypes.html#bytes
character encodinghttps://docs.python.org/howto/unicode.html
f-stringshttps://realpython.com/python-f-strings/
bin()https://docs.python.org/3/library/functions.html#bin
representshttps://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
carriage returnhttps://en.wikipedia.org/wiki/Carriage_return
Code: The Hidden Languagehttps://realpython.com/asins/0735611319/
cryptographically secure versionhttps://github.com/python/cpython/blob/c6040638aa1537709add895d24cdbbb9ee310fde/Lib/random.py#L676
this code snippethttps://github.com/realpython/materials/blob/master/random-data/bytes_to_int.py
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-random/#pythons-best-kept-secrets
one of the more colorful PEPshttps://www.python.org/dev/peps/pep-0506/
source codehttps://github.com/python/cpython/blob/3.6/Lib/secrets.py
tinyurl.comhttps://tinyurl.com
bit.lyhttps://bit.ly
https://bit.ly/2IcCp9uhttps://bit.ly/2IcCp9u
Root Zone Databasehttps://www.iana.org/domains/root/db
Build a URL Shortener With FastAPI and Pythonhttps://realpython.com/build-a-python-url-shortener-with-fastapi/
provehttps://github.com/realpython/materials/blob/master/random-data/urlsafe.py
https://realpython.com/python-random/#one-last-candidate-uuid
uuidhttps://docs.python.org/library/uuid.html
UUIDhttps://tools.ietf.org/html/rfc4122.html
also uses os.urandom()https://github.com/python/cpython/blob/78392885c9b08021c89649728053d31503d8a509/Lib/uuid.py#L623
MD5https://en.wikipedia.org/wiki/MD5
big-endianhttps://en.wikipedia.org/wiki/Endianness
formal specificationhttps://tools.ietf.org/html/rfc4122.html#section-4.1.1
undecillionhttps://en.wikipedia.org/wiki/Names_of_large_numbers
UUIDFieldhttps://docs.djangoproject.com/en/2.0/ref/models/fields/#uuidfield
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-random/#why-not-just-default-to-systemrandom
SystemRandomhttps://github.com/python/cpython/blob/b225cb770fb17596298f5a05c41a7c90c470c4f8/Lib/random.py#L666
timed.pyhttps://github.com/realpython/materials/blob/master/random-data/timed.py
https://realpython.com/python-random/#odds-and-ends-hashing
hashinghttps://en.wikipedia.org/wiki/Cryptographic_hash_function
hashlibhttps://docs.python.org/3/library/hashlib.html
https://realpython.com/python-random/#recap
randomhttps://docs.python.org/library/random.html
numpy.randomhttps://docs.scipy.org/doc/numpy/reference/routines.random.html
oshttps://docs.python.org/library/os.html
secretshttps://docs.python.org/library/secrets.html
uuidhttps://docs.python.org/library/uuid.html
https://realpython.com/python-random/#additional-links
Random.orghttps://www.random.org/
Recipeshttps://docs.python.org/3.6/library/random.html#examples-and-recipes
Mersienne Twisterhttp://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/ARTICLES/mt.pdf
Itertools Recipeshttps://docs.python.org/3.6/library/itertools.html#itertools-recipes
Scikit-Learnhttp://scikit-learn.org/stable/datasets/index.html#sample-generators
Slow and Fast Methods for Generating Random Integers in Pythonhttps://eli.thegreenplace.net/2018/slow-and-fast-methods-for-generating-random-integers-in-python/#id2
Concrete Introduction to Probability using Pythonhttp://nbviewer.jupyter.org/url/norvig.com/ipython/Probability.ipynb
context managerhttps://github.com/pandas-dev/pandas/blob/f9cc39fb1391cb05f55232367f6547ff9ea615b8/pandas/util/testing.py#L2513
Generating Random Dates In a Given Rangehttps://stackoverflow.com/q/50559078/7954504
Fastest Way to Generate a Random-like Unique String with Random Lengthhttps://stackoverflow.com/q/48421142/7954504
How to Use random.shuffle() on a Generatorhttps://stackoverflow.com/q/21187131/7954504
Replace Random Elements in a NumPy Arrayhttps://stackoverflow.com/q/31389481/7954504
Getting Numbers from /dev/random in Pythonhttps://stackoverflow.com/q/14720799/7954504
https://realpython.com/feedback/survey/article/python-random/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python-random/disliked/?from=article-footer
Generating Random Data in Pythonhttps://realpython.com/courses/generating-random-data-python/
https://realpython.com/team/bsolomon/
» More about Bradhttps://realpython.com/team/bsolomon/
https://realpython.com/team/acutenco/
Adrianahttps://realpython.com/team/acutenco/
https://realpython.com/team/gahjelle/
Geir Arnehttps://realpython.com/team/gahjelle/
https://realpython.com/team/jjablonski/
Joannahttps://realpython.com/team/jjablonski/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-random
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-random
https://realpython.com/feedback/survey/article/python-random/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python-random/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython-random%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Generating%20Random%20Data%20in%20Python%20%28Guide%29&url=https%3A%2F%2Frealpython.com%2Fpython-random%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Generating%20Random%20Data%20in%20Python%20%28Guide%29%20https%3A%2F%2Frealpython.com%2Fpython-random%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython-random%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
intermediatehttps://realpython.com/tutorials/intermediate/
data-sciencehttps://realpython.com/tutorials/data-science/
pythonhttps://realpython.com/tutorials/python/
Generating Random Data in Pythonhttps://realpython.com/courses/generating-random-data-python/
How to Write Beautiful Python Code With PEP 8https://realpython.com/python-pep8/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-random
Build a URL Shortener With FastAPI and Pythonhttps://realpython.com/build-a-python-url-shortener-with-fastapi/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-random
Defining Your Own Python Functionhttps://realpython.com/defining-your-own-python-function/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-random
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-random%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-random%2F
Sign-Inhttps://realpython.com/account/login/?next=/python-random/
Start Herehttps://realpython.com/start-here/
Learning Resourceshttps://realpython.com/search
Code Mentorhttps://realpython.com/mentor/
Python Referencehttps://realpython.com/ref/
Python Cheat Sheethttps://realpython.com/cheatsheets/python/
Support Centerhttps://support.realpython.com/
Learning Pathshttps://realpython.com/learning-paths/
Quizzes & Exerciseshttps://realpython.com/quizzes/
Browse Topicshttps://realpython.com/tutorials/all/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.