example = {'cat' : 1, 'dog' : 2, 'cow' : 3, 'horse' : 4}count = 0for x in example: count += example[x]print count
Standard input is empty
10
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!