Generating Random Data in Python

In this course, you’ll cover several 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.

About Jackie Wilson

Jackie Wilson Jackie Wilson

Jackie teaches computer science full-time for Cecil College, and fell in love with Python many years ago when she realized it wasn't pseudocode, but an actual language.

» More about Jackie

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Cody Roche on July 22, 2019

This was a great overview of random generation in Python. The examples in the standard library were great and full featured. I felt like I came away from them with a much deeper understanding of how they work!

that said, I feel like the coverage of secrets and uuid was much more shallow. Enough to get the basics, which is a great foundation. It left me wanting a follow-up that delves into more detail of cryptographicly secure randoms though.

Any chance there’ll be a part 2 covering that?

Pygator on Sept. 2, 2019

You have a very soothing voice. Good presentation of most topics and explaining where the functions come from in the various modules. I’ll read the tutorial next to dive more into secrets!

« Browse All Courses