Loops/Foreach: Difference between revisions

Content deleted Content added
→‎{{header|Python}}: fixed spelling
added swift
Line 1,427: Line 1,427:
<lang Suneido>for i in #(1, 2, 3)
<lang Suneido>for i in #(1, 2, 3)
Print(i)</lang>
Print(i)</lang>

=={{header|Swift}}==
<lang swift>for i in [1,2,3] {
println(i)
}</lang>
This works for any type that conforms to the <code>Sequence</code> protocol (including arrays, collections, generators, ranges, and strings).


=={{header|SystemVerilog}}==
=={{header|SystemVerilog}}==