creating a tuple that holds the values 1 through 6. Roll the dice by calling a function and display the random roll. For this example, let’s assume that the random roll is (2, 1, 5, 1, 5). The following message will be displayed: Rolling the dice... (2, 1, 5, 1, 5)
then from the random add implementing a counter function that adds up the values of the dice roll. For example.
(0, 2, 0, 0, 10, 0) since there were no zeros rolled the first number will be zero, second since there was 2 1's drawn they will add up to 2 and so on so fourth.
I have tried using this as my code.
from random import shuffle
roll_number = [1,2,3,4,5,6]
shuffle(roll_number)
print(f'Rolling the dice...{roll_number}')
from collections import Counter
lst = (roll_number)
c = Counter()
for n in lst:
c[n] += 1
for i in set(lst):
print(i * c[i])
but it prints out the same value every function call.