python roll a die

import random

roll = random.randint(1, 6) # random result 1-6

Here is what the above code is Doing:
1. We’re importing the random module.
2. We’re creating a variable called roll and assigning it a random integer between 1 and 6.
3. We’re printing the result of the roll.