CS 1301 – Ch 6, Handout 1

If you iterate over a set, you will see all the elements, but they will not be (in general) in the order that you added them. ... Dictionary: each word (key) is associated with a definition (value) ... One way to iterate over all the key-value pairs is to use a for-each loop over the keys and then use each key to . get . the corresponding value ... ................
................