foreach

foreach (iterator variable, list) { script }

Run a script for each item in a list. If the list is a dictionary, the loop iterates over the dictionary keys.

Note: Do not use an attribute as the iterator variable (see here).

For more on how and why to use foreach, see Using Lists