Top "Tuples" questions

In programming, tuples are simple *product types*, representing ordered collections of types.

Initialize tuple with empty or null values in C#

I have this dictionary and tuples set up in SetValue() as below :- var myDict = new Dictionary<string, Tuple&…

c# dictionary tuples trygetvalue
python all possible pairs of 2 list elements, and getting the index of that pair

let's say I have two lists: a = list(1,2,3) b = list(4,5,6) So I can have 9 pairs of these list members: (1,4) (1,5) (1,6) (2,4) (2,5) (2,6) (3,4) (3,5) (3,6) Now, …

python list tuples cartesian-product
Generate all subsets of size k (containing k elements) in Python

I have a set of values and would like to create list of all subsets containing 2 elements. For example, a …

python set tuples subset
When to use: Tuple vs Class c# 7.0

Before Tuples, I used to create a class and its variables then create object from this class and make that …

c# tuples c#-7.0 valuetuple
How to convert nested list of lists into a list of tuples in python 3.3?

I am trying to convert a nested list of lists into a list of tuples in Python 3.3. However, it seems …

python list tuples nested-lists type-conversion
Python list comprehension, unpacking and multiple operations

I want to unpack the tuples I create by doing the following so he the result is just one simple …

python tuples list-comprehension flatten
Java N-Tuple implementation

I just made a Java n-tuple which is type-safe. I'm using some unconventional methods to achieve type-safety (I just made …

java tuples type-safety
Convert anonymous type to new C# 7 tuple type

The new version of C# is there, with the useful new feature Tuple Types: public IQueryable<T> Query&…

linq-to-entities tuples anonymous-types linq-to-nhibernate c#-7.0
Swap values in a tuple/list inside a list in python?

I have a list of tuples like this: [('foo','bar'),('foo1','bar1'),('foofoo','barbar')] What is the fastest …

python list tuples swap
maximum and minimum number of tuples in natural join

I came across a question that states Consider the following relation schema pertaining to a students database: Student (rollno, name, …

sql join relational-database tuples natural-join