Skip to content

How to generate random list in Python with specific range?

import random
randomlist = []
for i in range(0,5):
n = random.randint(1,30)
See also  How to define a function in Python?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.