Top "Tuples" questions

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

List of tuples to dictionary

Here's how I'm currently converting a list of tuples to dictionary in Python: l = [('a',1),('b',2)] h = {} [h.update({k:…

python list dictionary tuples
Split tuple items to separate variables

I have tuple in Python that looks like this: tuple = ('sparkbrowser.com', 0, 'http://facebook.com/sparkbrowser', 'Facebook') and I wanna …

python tuples iterable-unpacking
Are tuples more efficient than lists in Python?

Is there any performance difference between tuples and lists when it comes to instantiation and retrieval of elements?

python performance list tuples python-internals
Using Tuples in Ruby?

Does anyone use tuples in Ruby? If so, how may one implement a tuple? Ruby hashes are nice and work …

ruby tuples relational
Convert a namedtuple into a dictionary

I have a named tuple class in python class Town(collections.namedtuple('Town', [ 'name', 'population', 'coordinates', 'population', 'capital', 'state_bird'])): # ... …

python dictionary tuples namedtuple
How to reverse tuples in Python?

Possible Duplicate: Traverse a list in reverse order in Python Is this possible? Doesn't have to be in place, just …

python loops iteration tuples
In what case would I use a tuple as a dictionary key?

I was studying the difference between lists and tuples (in Python). An obvious one is that tuples are immutable (the …

python list dictionary tuples
Does Python have an immutable list?

Does python have immutable lists? Suppose I wish to have the functionality of an ordered collection of elements, but which …

python list tuples immutability
Django - How to do tuple unpacking in a template 'for' loop

In my views.py, I'm building a list of two-tuples, where the second item in the tuple is another list, …

python django templates tuples iterable-unpacking
how to split column of tuples in pandas dataframe?

I have a pandas dataframe (this is only a little piece) >>> d1 y norm test y norm …

python numpy pandas dataframe tuples