manipulating-lists/quickref.tex
author Puneeth Chaganti <punchagan@fossee.in>
Wed, 10 Nov 2010 12:32:16 +0530
changeset 437 0840aa06d2e6
parent 423 0f0f4993cffe
permissions -rw-r--r--
Parially cleaned up conditionals LO.

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