Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to import random module in python

# To import the random module in python, do the following

import random # This will import

# testing

print(random.randint(0, 3)) # This will print a random number from 0 to 3

# Hope this helps!!

# By Codexel
 
PREVIOUS NEXT
Tagged: #import #random #module #python
ADD COMMENT
Topic
Name
3+1 =