title: How to iterate a loop with index and element in Swift
body: <p>Is there a function that I can use to iterate over an array and have both index and element, like Python's <code>enumerate</code>?</p>
  <pre><code>for index, element in enumerate(list):
      ...
  </code></pre>