2013-12-29 17:34:42 -05:00
|
|
|
# basic dictionary
|
|
|
|
|
|
|
|
d = {}
|
|
|
|
print(d)
|
|
|
|
d[2] = 123
|
|
|
|
print(d)
|
|
|
|
d = {1:2}
|
|
|
|
d[3] = 3
|
|
|
|
print(d)
|
|
|
|
d[1] = 0
|
|
|
|
print(d)
|
|
|
|
print(d[1])
|
|
|
|
|
|
|
|
x = 1
|
2016-02-12 18:38:30 -05:00
|
|
|
while x < 100:
|
2013-12-29 17:34:42 -05:00
|
|
|
d[x] = x
|
|
|
|
x += 1
|
2016-02-12 18:38:30 -05:00
|
|
|
print(d[50])
|