summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPuneeth Chaganti2011-07-28 16:01:28 +0530
committerPuneeth Chaganti2011-07-28 16:01:28 +0530
commitc5321b16ea571bb2cc1e0a0953b73a641de34c4a (patch)
tree4e45e2771e20a614a8c791dabb354295c64838d8
parentaf0bca6f438b206a94ae87a35d805ee04d6e72ec (diff)
downloadst-scripts-c5321b16ea571bb2cc1e0a0953b73a641de34c4a.tar.gz
st-scripts-c5321b16ea571bb2cc1e0a0953b73a641de34c4a.tar.bz2
st-scripts-c5321b16ea571bb2cc1e0a0953b73a641de34c4a.zip
Fix getting_started_with_lists/script.rst for 2-column format.
-rw-r--r--getting_started_with_lists/script.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/getting_started_with_lists/script.rst b/getting_started_with_lists/script.rst
index 2264d45..a6cbce0 100644
--- a/getting_started_with_lists/script.rst
+++ b/getting_started_with_lists/script.rst
@@ -188,7 +188,7 @@ Let us find out the length of the list 'nonempty'.
.. L13
::
-
+
len(nonempty)
.. R14
@@ -317,21 +317,21 @@ Here are some self assessment questions for you to solve
And the answers,
1. We create an empty list just by leaving the space inside the square
-brackets empty.
-::
+ brackets empty.
+ ::
empty=[]
2. Yes.List can contain all the other data types, including list.
Here is an example
-::
+ ::
list_in_list=[2.3,[2,4,6],'string,'all datatypes can be there']
3. Using negative indices, we can access the list from the end using
negative indices.
This is an example
-::
+ ::
nonempty = ['spam', 'eggs', 100, 1.234]
nonempty[-1]