Skip to content

Python code snippet – How to get random number ?

# generate random integer values
from random import randint

value = randint(0, 10)
print(value)
See also  Python code snippet - How to print variables in a string ?

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.