How to generate different random numbers with random in Python

Posted on: February 3rd, 2023
By: Tadeo Martinez

The “100” is the range, and in range it goes from 0 – 100, unless the first number isn’t specified.

10 in this case is the amount of numbers that will be generated

import random
random.sample(range(100), 10)

# Output


Here’s the StackOverflow article:

Have any questions or comments? Write them below!

Leave a Reply

Your email address will not be published. Required fields are marked *