1. John Rizzo
  2. pynie


pynie / Lib / test / bootstrap / dicts.py


print('test: one element dict')
a = {"foo":1}
if a: print('success: one element dict')
else: print('failure: one element dict')

print('test: display dict element')
b = a['foo']
if b == 1: print('success: display dict element')
else: print('failure: display dict element')

print("test: display dict {'foo': 1}")
print("success: display dict", a)

print('test: add element to dict')
a['bar'] = "baz"
b = a['bar']
if b == 'baz': print('success: add element to dict')
else: print('failure: add element to dict')