Working With Python's namedtuple()

preview_player
Показать описание
Python’s collections module provides a factory function called namedtuple(), which is specially designed to make your code more Pythonic when you’re working with tuples. With namedtuple(), you can create immutable sequence types that allow you to access their values using descriptive field names and the dot notation instead of unclear integer indices.

This is a portion of the complete course, which you can find here:

The rest of the course covers:
- Understanding namedtuple Class utilities
- Decide whether to use a namedtuple or a similar data structure
- Subclass a namedtuple to provide new features and extend the class
Рекомендации по теме
Комментарии
Автор

7:10 "In fact anything you do to a list, you can do to John's kids."

ikarosainasoja