Python - How to import 'random'

Import random

To import random, Add the following line to the top of your code.

import random

 

For more information about random:
Python random