diff options
author | Jovina | 2011-07-28 17:03:04 +0530 |
---|---|---|
committer | Jovina | 2011-07-28 17:03:04 +0530 |
commit | 68f3741c2fd2acc79089ffaaa88e85632e0ba23b (patch) | |
tree | 364e823275e51c298db53391465ddef1005b9a23 /getting_started_with_lists | |
parent | a967e341eaf683b27c92b5e4817cb62f3f14e572 (diff) | |
parent | cc476c4e86346ca0d92e72cd84efb7d3e90069ac (diff) | |
download | st-scripts-68f3741c2fd2acc79089ffaaa88e85632e0ba23b.tar.gz st-scripts-68f3741c2fd2acc79089ffaaa88e85632e0ba23b.tar.bz2 st-scripts-68f3741c2fd2acc79089ffaaa88e85632e0ba23b.zip |
Merge branch 'master' of https://github.com/FOSSEE/st-scripts
Diffstat (limited to 'getting_started_with_lists')
-rw-r--r-- | getting_started_with_lists/script.rst | 10 |
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] |