Writing Pythonic code is an in-demand skill in the Python development space. Pythonic code is readable, explicit, clean, maintainable, and takes advantage of Python idioms and best practices. In this video course, you learned about creating namedtuple classes and instances and how they can help you improve the quality of your Python code.
In this video course, you learned:
- How to create and use
namedtupleclasses and instances - How to take advantage of cool
namedtuplefeatures - When to use
namedtupleinstances to write Pythonic code - When to use a
namedtupleinstead of a similar data structure - How to subclass a
namedtupleto add new features
With this knowledge, you can deeply improve the quality of your existing and future code. If you frequently use tuples, then consider turning them into named tuples whenever it makes sense. Doing so will make your code much more readable and Pythonic.
To learn more about the concepts in this course, check out the following resources:
