I've been looking with no success for a way to sum the total number of items in a list. Using ATBS beginner python book. My code is as follows:
import pprint
items = {'rope': 1, 'torch': 6, 'gold coin': 42, 'dagger': 1, 'arrow': 12}
print('Inventory:')
for item, inven_count in items.items():
item_total = ???
print(str(inven_count) + ' ' + item)
print('Total number of items: ' + str(item_total))
The item_total line is what I'm unsure of. I know that the answer I want is 62, but I've been unable to think of the right way to word my code to reach that answer. Thanks very much!