'''
Lists are enclosed in brackets:

l = [1, 2, "a"]

--------------------------------------------------------------------------------------------
Tuples are enclosed in parentheses:

t = (1, 2, "a") or
l=1,2,3,4

months = ('January','February','March','April','May','June',\
'July','August','September','October','November','  December')

>> Tuples are faster and consume less memory. See Tuples for more information.
The main difference being that tuple manipulation are faster than list because tuples are immutable.

--------------------------------------------------------------------------------------------

Dictionaries are built with curly brackets:

------------------------------------------

d = {"a":1, "b":2}

 -------------------------------------------------------------------------------------------

When to use a dictionary:
---------------------------
1. When you need a logical association between a key:value pair.
2. When you need fast lookup for your data, based on a custom key.
3. When your data is being constantly modified. Remember, dictionaries are mutable.
--------------------------------------------------------------------------------------------

SET : (immutable)

Sets are made using the set() builtin function. More about the data structures here below:
 Since sets cannot have duplicated, there are usually used to build sequence of unique items (e.g., set of identifiers)

a = set([1, 2, 3, 4]) --> Create set from list
a = {"new york", "connecticut", "new jersey"}


# An empty set.
items = set()

# Add three strings.
items.add("cat")
items.add("dog")
items.add("gerbil")
print(items)


--------------------------------------------------------------------------------------------

deque (https://docs.python.org/2/library/collections.html)
------

from collections import deque
d = deque('ghi')                 # make a new deque with three items
for elem in d:
print elem.upper()
append / popleft/


--------------------------------------------------------------------------------------------

defaultdict (https://docs.python.org/2/library/collections.html)
-------------

Using list as the default_factory, it is easy to group a sequence of key-value pairs into a dictionary of lists:
s = [('yellow', 1), ('blue', 2), ('yellow', 3), ('blue', 4), ('red', 1)]
d = defaultdict(list)
for k, v in s:
    d[k].append(v)
d.items()
--------------------------------------------------------------------------------------------




>>>



'''
