[lang-ref] ( null_coalescing_like_op_in_dictionary ) ( python )
def test_null_coalescing_like_op_in_dictionary():
# d.get(k, 'not set')
d = { 'A': 'Apple', 'B': 'Banana', 'C': 'Cherry' }
assert d.get('B', 'not set') == 'Banana'
assert d.get('D', 'not set') == 'not set'