Closed andreakarasho closed 5 years ago
Even better:
for i in mylist.indexes
print mylist[i]
end for
Or, of course:
for item in mylist
print item
end for
So we thought a lot about how range() should behave, and finally settled on the current behavior for a couple of reasons:
I do understand this behavior may be surprising to people that have done a lot of coding in other languages, though, where the semi-open interval is standard and convenient for integer ranges.
Make sense thanks
Much readable, less space, less chars, more intuitive:
Than actual