What about adding Python syntax a[2:4]?

array[2:4]
array[2:]
string[2:4]
string[:4]

Other languages use .. or ... instead of :.

It also can:

array = [1, 2, 3, 4, 5, 6, 7, 8, 9]
array[2:8] = [100]  // [1, 2, 100, 9]
array = [1, 2, 3, 4, 5]
array[2:4] = [100, 101, 102, 103, 104]  // [1, 2, 100, 101, 102, 103, 104, 5]
2 Likes

Thanks. 4 years and still stage 1. Interesting why.

I think it has to come with assignment to be complete. Otherwise it will remain unfinished like ?. (still no assignment).