from __future__ import division
from scipy import *

# tuple (immutable) (can not be changed)
t = (1, 'a', sin)
print 't', t

# list (mutable) (can be changed)
l = [7, 'aoeu', 1.6]
l[2] = 10
print 'l', l

# string (immutable)
s = 'abcdef'
print 's', s

# array (mutable)
a = array([10.5, 8.7, 3.1])
a[2] = 7
print 'a', a

# dictionary {immutable: value} (dictionaries are mutable)
key = 5
x = {
    'AIMS': 'South Africa',
    'Accra': 'Ghana',
    'Paris': 'France',
    'Cape Town': 'South Africa',
    10.5: 'Jamil (can we use numbers?)',
    'trigonometry': [sin, cos, tan],
    (1,2,3): [4,5,6],
    sin: 4,
    key: 100,
    1+2j: 'a',
    True: 't',
    'dictionary': {'a': 1, 'b': 2, 'c': 3},
}
x['trigonometry'] = tanh
x['pi'] = 3.14159
del x['Cape Town']

y = {}
y['a'] = 1
y['x'] = 100

print x.has_key(5)

for key in x:
    print key, x[key]


