About 349,000 results
Open links in new tab
  1. 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 …

  2. Python - All pair combinations of 2 tuples - GeeksforGeeks

    Apr 19, 2023 · Sometimes, while working with Python tuples data, we can have a problem in which we need to extract all possible combination of 2 argument tuples. This kind of …

  3. Tuple Operations in Python - GeeksforGeeks

    Apr 11, 2025 · Python Tuple is a collection of objects separated by commas. A tuple is similar to a Python list in terms of indexing, nested objects, and repetition but the main difference between …

  4. Python | Ways to concatenate tuples - GeeksforGeeks

    May 18, 2023 · Concatenate the two tuples test_tup1 and test_tup2 using + operator and assign the result to a new variable res. Print the concatenated tuple res using print () function and …

  5. How to compare 2 tuples in Python (basic and advanced)

    Feb 12, 2024 · In this tutorial, we will explore the basics of comparing two tuples in Python, then dive into more advanced techniques, providing examples to illustrate key concepts.

  6. python - Merge two tuples into one - Stack Overflow

    What is the best way of combining the two tuples? Use zip and a generator expression: First expected output: y if y is not None else "") for x,y in zip(t1,t2)) Second expected output: Use …

  7. python - Elegant way to perform tuple arithmetic - Stack Overflow

    Jul 2, 2013 · What is the most elegant and concise way (without creating my own class with operator overloading) to perform tuple arithmetic in Python 2.7? Lets say I have two tuples:

  8. Python Tuple (With Examples) - Programiz

    In Python, we use tuples to store multiple data similar to a list. In this article, we'll learn about Python Tuples with the help of examples.

  9. Python: How to create a new tuple from 2 existing tuples (basic …

    Feb 12, 2024 · Python’s tuples offer a potent yet simple means of grouping data. Through this guide, we’ve explored how to merge two tuples using techniques ranging from straightforward …

  10. Python Tuples: A Step-by-Step Tutorial (with 14 Code Examples)

    Mar 28, 2022 · This tutorial covered how to create tuple objects, as well as many aspects of Python tuples, such as indexing, slicing, zipping, unpacking, etc. We also discussed the …

  11. Some results have been removed
Refresh