The
for in
construct can be used to iterate through anIterator
. One of the easiest ways to create an iterator is to use the range notationa..b
. This yields values froma
(inclusive) tob
(exclusive) in steps of one.
https://doc.rust-lang.org/rust-by-example/flow_control/for.html#for-and-range