#reversing a string inside a loop
1 messages · Page 1 of 1 (latest)
println(stack[i])
stack[i] = reverse(stack[i])
println(stack[i])```
yields
MZ
ZM``` as the first two outputs on your input
at least on my end
I think your issue might be that you're reversing the data before you might want to
if you reverse the stack while populating your lists, you end up reversing the list, and then later appending some character or another