Watch index n ( and y)
n = 0
while(0 < y):
result[ n += 1] = items[y -= 1]
So the above is accepted syntax. Is there an elegant way to do this, in the order of Java's
result[ n++] = items[--y]
No, this is not accepted syntax.
If I understand correctly what you are trying to do, the pythonic way would be
result = items[::-1]
or
result = list(reversed(items))
(the reversed function itself returns an iterator, not a list).
n: result[ n += 1]. Thanks for your response, though.
array[i] = aandi += 1. I suppose it may not be such a big deal. Nonetheless that's the question.