Member Avatar

Here's a simple tutorial on dictionaries in Python: Dictionaries: Dictionaries are similar to other compound types except that they can use any immutable type as an index. One way to create a dictionary is to start with the empty dictionary and add items. The empty dictionary is denoted {}: [CODE]end2sp = {} end2sp[ "one" ] = "uno" end2sp[ "two" ] = "dos"[/CODE] We can print the current value of the dictionary in the usual way: [CODE]print eng2sp # --> { "one":"uno", "two":"dos" }[/CODE] The elements of a dictionary appear in a coma-separated list. Each entry contains an index and a …

Member Avatar
+5 forum 16

The End.