From f3a34dfb4e879f3eb7274704f44546aac4add88f Mon Sep 17 00:00:00 2001 From: Puneeth Chaganti Date: Wed, 1 Dec 2010 16:51:35 +0530 Subject: Renamed all LOs to match with their names in progress.org. --- manipulating_lists/quickref.tex | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 manipulating_lists/quickref.tex (limited to 'manipulating_lists/quickref.tex') diff --git a/manipulating_lists/quickref.tex b/manipulating_lists/quickref.tex new file mode 100644 index 0000000..d571a9e --- /dev/null +++ b/manipulating_lists/quickref.tex @@ -0,0 +1,10 @@ +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 -- cgit