Or
for i in eachindex(v)[begin:end-1]
which produces the same result - it’s mostly a matter of style/taste.