You are viewing a single comment's thread. Return to all comments →
Ok, here is the explanation. The simple print(*arr[::-1]) is equivalent to:
output_str = "" inverse_array = arr[::-1] for element in inverse_array: output_str = output_str + " " + str(element) print(output_str)
This is why Python has it all.
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays - DS
You are viewing a single comment's thread. Return to all comments →
Ok, here is the explanation. The simple print(*arr[::-1]) is equivalent to:
This is why Python has it all.