getting-started-with-lists/quickref.tex
changeset 342 588b681e70c6
parent 320 223044cf254f
--- a/getting-started-with-lists/quickref.tex	Wed Oct 20 16:19:55 2010 +0530
+++ b/getting-started-with-lists/quickref.tex	Thu Oct 21 00:22:42 2010 +0530
@@ -1,8 +1,19 @@
-Creating a linear array:\\
-{\ex \lstinline|    x = linspace(0, 2*pi, 50)|}
+Creating an list\\
+{\ex \lstinline| empty=[]|}
+
+Create a filled list\\
+{\ex \lstinline| nonempty = ['spam', 'eggs', 100, 1.234]  |}
+
+Accessing a list\\
+{\ex \lstinline|    nonempty[0] |}
+{\ex \lstinline|    nonempty[-1] |}
 
-Plotting two variables:\\
-{\ex \lstinline|    plot(x, sin(x))|}
+Length of a list\\
+{\ex \lstinline|    len(nonempty) |}
 
-Plotting two lists of equal length x, y:\\
-{\ex \lstinline|    plot(x, y)|}
+Append an element to a list\\
+{\ex \lstinline|    nonempty.append('python') |}
+
+Remove elements of a list\\
+{\ex \lstinline|    del(nonempty[1] |}
+{\ex \lstinline|  nonempty.remove(100) |}