manipulating_lists/quickref.tex
author Anoop Jacob Thomas<anoop@fossee.in>
Sat, 18 Dec 2010 12:54:49 +0530
changeset 524 b602b4dcc87d
parent 522 d33698326409
permissions -rw-r--r--
Made some changes to the script embellishing a plot, but it still needs changes.

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