diff options
author | Nishanth Amuluru | 2010-09-23 16:57:44 +0530 |
---|---|---|
committer | Nishanth Amuluru | 2010-09-23 16:57:44 +0530 |
commit | 7b1d8ae495be983474c300ec4ba54b852da06c45 (patch) | |
tree | c1cf9c3f7cb2b6442dc8897d1e9917be9d6c6dae /getting_started_with_lists.rst | |
parent | 9c829c39a7f22430eed310d9e70dd83640a96fa5 (diff) | |
parent | 14e5192b0cd2afd97d8605b8774ade593e5acaba (diff) | |
download | st-scripts-7b1d8ae495be983474c300ec4ba54b852da06c45.tar.gz st-scripts-7b1d8ae495be983474c300ec4ba54b852da06c45.tar.bz2 st-scripts-7b1d8ae495be983474c300ec4ba54b852da06c45.zip |
Merged changes
Diffstat (limited to 'getting_started_with_lists.rst')
-rw-r--r-- | getting_started_with_lists.rst | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/getting_started_with_lists.rst b/getting_started_with_lists.rst index cc52650..9a09daa 100644 --- a/getting_started_with_lists.rst +++ b/getting_started_with_lists.rst @@ -50,7 +50,7 @@ in lists. Thus lists can also contain other lists. Example :: We access list elements using the number of index. The index begins from 0. So for list nonempty, nonempty[0] gives the first element, nonempty[1] the second element and so on and -nonempty[3] the last element.:: +nonempty[3] the last element. :: nonempty[0] nonempty[1] @@ -65,9 +65,6 @@ We can also access the elememts from the end using negative indices :: -1 gives the last element which is the 4th element , -2 second to last and -4 gives the fourth from last element which is first element. - - - We can append elements to the end of a list using append command. :: nonempty.append('onemore') @@ -80,7 +77,7 @@ As we can see non empty appends 'onemore' and 6 at the end. Using len function we can check the number of elements in the list -nonempty. In this case it being 6: +nonempty. In this case it being 6 :: len(nonempty) @@ -134,6 +131,6 @@ I hope you found this tutorial useful. Thank You -Author : Amit Sethi -First Reviewer : -Second Reviewer : Nishanth + * Author : Amit Sethi + * First Reviewer : + * Second Reviewer : Nishanth |