Oct 08, 2021
Python Collections
Python comes with general purpose datatypes like dict, list or set. Those types are commonly used everywhere with the best tradeoff in term of performance and application scope. But there are times where we might see ourselves repeating a specific implementation, for example counting values while storing them in a dict is one of those cases. To cater for those repeated scenarios, the collections module gives us access to alternative types that can be used for specialized purposes. In today’s post we will look at some of those types with examples.