I also found the following code:
import random as rand
numberOfDice = int(input("How many dice do you want to roll? "))
sidesOnADice = int(input("How many sides do you want to roll dice? d"))
for i in range(numberOfDice):
print(rand.randrange(sidesOnADice) + 1)