name) in zip(names.indices, names) {
    if name.characters.count &lt;= 5 {
        shorterIndices.append(i)
    }
}</code></pre>

<p>Now that the <code>shorterIndices</code> array holds the indices of the shorter
names in the <code>names</code> set, you can use those indices to access elements in
the set.</p>

<pre><code class="language-swift">for i in shorterIndices {
    print(names[i])
}
// Prints &quot;Sofia&quot;
// Prints &quot;Mateo&quot;</code></pre>

<p><strong>Returns:</strong> A sequence of pair