named tuple
-
Compare Dictionary, Named Tuple, Data Class, and Pydantic Model in Python
Python is an object-oriented programming language and there are various ways to represent data as objects. Simple objects can be represented by dictionaries with key-value pairs. And more complex ones can be represented by some special data classes including namedtuple, data class, and Pydantic models. In this post, we will introduce these data types with… Continue reading