About 3,310,000 results
Open links in new tab
  1. python - What is a tuple useful for? - Stack Overflow

    Sep 9, 2014 · Tuples are used whenever you want to return multiple results from a function. Since they're immutable, they can be used as keys for a dictionary (lists can't).

  2. Python's tuple Data Type: A Deep Dive With Examples

    In Python, a tuple is a built-in data type that allows you to create immutable sequences of values. The values or items in a tuple can be of any type. This makes tuples pretty useful in those …

  3. Python Tuples - W3Schools

    Tuples are used to store multiple items in a single variable. Tuple is one of 4 built-in data types in Python used to store collections of data, the other 3 are List, Set, and Dictionary, all with …

  4. The Power of Tuples: When and Why to Choose Them Over Lists

    Sep 10, 2023 · In Python, both tuples and lists are used for storing collections of items. However, tuples and lists serve different purposes and offer distinct advantages. This technical article …

  5. Tuples in Python. Why you should use them, and how you… | by …

    May 28, 2020 · In Python, tuples are sequences of objects, very much like lists. Visually, tuples are defined with parentheses () instead of square brackets [] like lists. Functionally tuples, …

  6. Python Tuples - Python Guides

    Python Tuples are ordered, immutable collections used to store multiple items. They support indexing and can hold mixed data types, just like lists. ... Why Use Tuples? Immutability: Once …

  7. Python Tuples - GeeksforGeeks

    Apr 11, 2025 · Tuples are similar to lists, but unlike lists, they cannot be changed after their creation (i.e., they are immutable). Tuples can hold elements of different data types. The main …

  8. Python Tuple: How to Create, Use, and Convert

    Jun 24, 2024 · Like everything in Python, tuples are objects and have a class that defines them. We can also create a tuple by using the tuple() constructor from that class. It allows any …

  9. Tuples and When to Use Them in Python - Syskool

    In Python, tuples are an important and versatile data structure. They are similar to lists, but with a key difference: tuples are immutable. This immutability makes them ideal for certain use cases …

  10. Python Tuples Tutorial: Create & Use Tuples Functions with …

    Feb 7, 2018 · Similar to Python lists, tuples are another standard data type that allows you to store values in a sequence. They might be useful in situations where you might want to share …

  11. Some results have been removed