About 785,000 results
Open links in new tab
  1. Namedtuple in Python - GeeksforGeeks

    Aug 1, 2024 · In Python, NamedTuple is present inside the collections module. It provides a way to create simple, lightweight data structures similar to a class, but without the overhead of …

  2. collections — Container datatypes — Python 3.14.0 documentation

    2 days ago · namedtuple() Factory Function for Tuples with Named Fields ¶ Named tuples assign meaning to each position in a tuple and allow for more readable, self-documenting code. They …

  3. Write Pythonic and Clean Code With namedtuple – Real Python

    Jun 16, 2025 · Python’s namedtuple in the collections module allows you to create immutable sequences with named fields, providing a more readable and Pythonic way to handle tuples. …

  4. Python NamedTuple

    In this tutorial, you'll learn how to use the Python namedtuple function to create named tuples.

  5. types - What are "named tuples" in Python? - Stack Overflow

    Jun 4, 2010 · Named tuples are basically easy-to-create, lightweight object types. Named tuple instances can be referenced using object-like variable dereferencing or the standard tuple …

  6. Python NamedTuple Examples – How to Create and Work with …

    Oct 12, 2021 · A NamedTuple provides the immutability of a tuple, while also making your code easy to understand and use. In this tutorial, you'll learn how to create and use NamedTuples …

  7. Mastering `namedtuple` in Python: A Comprehensive Guide

    Apr 1, 2025 · Python is renowned for its simplicity and versatility, and the `namedtuple` is one of the many features that contribute to its charm. `namedtuple` provides a convenient way to …

  8. Python - NamedTuple - Online Tutorials Library

    In Python, a namedtuple () is a subclass of tuple that allows you to create tuples with named fields. Meaning, you can access the elements of the tuple using fieldnames instead of just …

  9. Working with namedtuple in Python - ianwaldron.com

    A quick refresher on Python namedtuples, what makes them special, and how to properly implement the methods and attributes they provide.

  10. Mastering Python Named Tuples: A Comprehensive Guide to …

    This blog provides an in-depth exploration of Python named tuples, covering their creation, features, applications, and nuances to ensure a thorough understanding of this versatile tool.