You are viewing a single comment's thread. Return to all comments →
A=[1,2,3] print(*A) 1 2 3
we use [::] to slice. refer http://pythoncentral.io/how-to-slice-listsarrays-and-tuples-in-python/
eg: If we want to get a sliced list in reverse order.
print(A[::-1]) [3, 2, 1]
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 →
we use [::] to slice. refer http://pythoncentral.io/how-to-slice-listsarrays-and-tuples-in-python/
eg: If we want to get a sliced list in reverse order.