May-03-2019, 05:50 PM
Take this array: [[100, 200, 0], [100, 300, 1], [100, 400, 2]]
It can be split into three things: [position1, position2, message]
I can reverse the main array using the [::-1], but when I read from it, and use that data, the result is the same.
Is there a way I can read just the last value from my array in reverse.
So, if I print the current array it is:
Thanks,
Dream
It can be split into three things: [position1, position2, message]
I can reverse the main array using the [::-1], but when I read from it, and use that data, the result is the same.
Is there a way I can read just the last value from my array in reverse.
So, if I print the current array it is:
Output:[100, 200, 0]
[100, 300, 1]
[100, 400, 2]
but when I reverse just the last value, it will be:Output:[100, 200, 3]
[100, 300, 2]
[100, 400, 1]
How can I achieve this?Thanks,
Dream