Skip to main content
Skip table of contents

dictionary

Features

Dictionary specifies the keys and values and lists the values.

Example

PY
d = dict(a = 1, b = 3, c = 5)

colors = dict()
colors["cherry"] = "red"

ages = {'Kim':35, 'Lee':38, 'Chang':37}
tp_log("Ages of Kim = " + str(ages['Kim']))
#expected print result: Ages of Kim = 35
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.