0 votes
in Python by
What is [::-1} used for?

1 Answer

0 votes
by
[::-1} reverses the order of an array or a sequence. However, the original array or the list remains unchanged.

import array as arr

Num_Array=arr.array('k',[1,2,3,4,5])

Num_Array[::-1]

Related questions

0 votes
asked Feb 11, 2020 in Python by rahuljain1
0 votes
asked Jan 11, 2021 in Python by SakshiSharma
...