I want initialize multiple variables in a for loop, like for example something like this:
for (i, j) in (1..=4),(10..=16).step_by(2){ println!("i = {i}, j ={j}"); }
The result would be something like:
i = 1, j = 10 i = 2, j = 12 i = 3, j = 14 i = 4, j = 16
I have checked this post: How to use multiple variables in Rust's for loop? but I haven´t found anything useful for me, I know I can use a while loop, but I find the ability to set everything in just one line much clearer