Python: Dictionary

collections.defaultdict(int)

nick3499
1 min readApr 7, 2017

The int setting is used for counting. In the code below, the letters of the word mississippi are listed, along with integer values, used to display the counts.

[('i', 4), ('p', 2), ('s', 4), ('m', 1)]

--

--

nick3499
nick3499

Written by nick3499

coder of JavaScript and Python

No responses yet