Update Counter collection in python with string, not letter
Update Counter collection in python with string, not letter Question: How to update a Counter with a string, not the letters of the string? For example, after initializing this counter with two strings: from collections import Counter c = Counter([‘black’,’blue’]) “add” to it another string such as ‘red’. When I use the update() method it …