Write a function that multiplies each dictionary value by portions portions = 5 grams = 0 y = {'Marlboro': [3, 13, 6, 66, 13, 7, 13]} for el in y.get('Marlboro'): el * portions print(el)
out = (x*5 for x in y) y = {'Marlboro': [3, 13, 6, 66, 13, 7, 13]} for el in y.get('Marlboro'): el * portions print(el)