manipulating-lists/quickref.tex
author bhanu
Mon, 15 Nov 2010 15:45:27 +0530
changeset 513 c1f89e89d89c
parent 423 0f0f4993cffe
permissions -rw-r--r--
Language check done for `getting started with strings`

Slicing \& Striding a list:\\
{\ex \lstinline|    A[start:stop:step]|} \lstinline|stop| excluded

Sorting a list:\\
{\ex \lstinline|    sorted(A)|} -- returns new list
{\ex \lstinline|    A.sort()|} -- in-place sort

Reversing a list:\\
{\ex \lstinline|    A[::-1]|} -- returns new list
{\ex \lstinline|    A.reverse()|} -- in-place reverse