a = [1, 123, 456]
print a
a_squares = []
for v in a:
a_squares = a_squares + [v*v]
print a_squares
a_squares = []
for v in a:
a_squares.append(v*v)
print a_squares
a_squares = [ v*v for v in a ]
print a_squares
d = { 'bob': 20, 'joe': 21 }
print d
d['bob']
d['bob'] = 21
print d
d['jane'] = 20
print d
print a
for p,age in d.iteritems():
print "Hello "+p+", you are "+str(age)
message = { p: "Hello, you are "+str(age) for p,age in d.iteritems() }
print message
message = { p: "Hello, you are "+str(age) for p,age in d.iteritems() if age > 20 }
print message
a
a[1] = 1234567
print a