I\'ve got a list of Tokens which looks something like:
[{ Value: \"Blah\", StartOffset: 0, EndOffset: 4 }, ... ]
What I want to do
token = [{ 'Value': "Blah", 'StartOffset': 0, 'EndOffset': 4 }, ... ] value_counter = {} for t in token: v = t['Value'] if v not in value_counter: value_counter[v] = 0 value_counter[v] += 1 print value_counter