|
|
|
|
|
by ajuc
1073 days ago
|
|
By now we've been doing for (int i=0; i<13; i++) {
whatever(array[i]);
}
and
def printHello():
print("hello world"[0:5])
for decades. No point vastly messing up consistency for minimal gain. BTW notice how in both cases we count to n elements despite using 0..n-1 indexing. You don't, in fact - need to put 12 anywhere if you mean 13 elements. |
|
The point is there is no one true way, it's a trade-off.