This example will teach us how to multiply all the values in a dictionary.
Source Code
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
dict1 = {'a': 1, 'b': 2, 'c': 3, 'd': 4}
total = 1
for i in dict1.keys():
total *= dict1[i]
print("The result is: ", total)
3. Result
Output:
The result is: 24