Top "Tuples" questions

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

Extended tuple unpacking in Python 2

Is it possible to simulate extended tuple unpacking in Python 2? Specifically, I have a for loop: for a, b, c …

tuples python-2.x iterable-unpacking
Triples in Java

Possible Duplicate: Does Java need tuples? Does Java support triples or at least pairs? Does Java support tuples? I am …

java tuples triples
Accessing SML tuples by Index Variable

Question is simple. How to access a tuple by using Index variable in SML? val index = 5; val tuple1 = (1,2,3,4,5,6,7,8,9,10); val correctValue = #…

tuples sml
Extract the second element of a tuple in a pipeline

I want to be able to extract the Nth item of a tuple in a pipeline, without using with or …

tuples elixir pipeline
Haskell- Two lists into a list of tuples

I am trying to implement a function (described below) that takes two lists (each or both may be infinite) and …

list haskell tuples infinite
Why in Python does "0, 0 == (0, 0)" equal "(0, False)"?

In Python (I checked only with Python 3.6 but I believe it should hold for many of the previous versions as …

python tuples operator-precedence
python ValueError: too many values to unpack in tuple

So I am extracting data from a JSON file. I am trying to pack my data in a way so …

python json tuples unpack
Why does the 2-tuple Functor instance only apply the function to the second element?

import Control.Applicative main = print $ fmap (*2) (1,2) produces (1,4). I would expect it it to produce (2,4) but instead the function is applied …

haskell tuples functor
Pylint warning: Possible unbalanced tuple unpacking with sequence

I have a piece of Python code: def func1(): a=set() b = ','.join(map(str, list(a))) return …

python tuples pylint packing
Why does unpacking a struct result in a tuple?

After packing an integer in a Python struct, the unpacking results in a tuple even if it contains only one …

python struct tuples pack unpack