Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 4

37 bytes added, 15:47, 15 June 2017
PART 3 - Dictionaries
dict_york = {'Address': '70 The Pond Rd', 'City': 'Toronto', 'Postal Code': 'M3J3M6'}
</source>
::#The syntax here to define a dictionary is to use '''{}''' to create a dictionary and placing (like you learned with sets), but place '''<code>key:value</code>''' pairs within the dictionary, each ''key:value'' pair in turn, are separated by commas.
::#Issue the following and note all the available functions available to dictionary objects:<source>
dir(dict_york)
13,420
edits