diff options
author | Puneeth Chaganti | 2010-10-11 11:40:43 +0530 |
---|---|---|
committer | Puneeth Chaganti | 2010-10-11 11:40:43 +0530 |
commit | f99a45904bb0b8f5bc90db2c99793ae1484626b9 (patch) | |
tree | 30766a65a5a2d4ad7966327b7ccd1d30ff9dc649 /manipulating-strings/script.rst | |
parent | 98aafc8888970c0dc6da22cfb057c103334065ed (diff) | |
download | st-scripts-f99a45904bb0b8f5bc90db2c99793ae1484626b9.tar.gz st-scripts-f99a45904bb0b8f5bc90db2c99793ae1484626b9.tar.bz2 st-scripts-f99a45904bb0b8f5bc90db2c99793ae1484626b9.zip |
Slides for manipulating strings LO.
Diffstat (limited to 'manipulating-strings/script.rst')
-rw-r--r-- | manipulating-strings/script.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/manipulating-strings/script.rst b/manipulating-strings/script.rst index 1ba16d1..7873575 100644 --- a/manipulating-strings/script.rst +++ b/manipulating-strings/script.rst @@ -6,7 +6,7 @@ .. 1. Slice strings and get sub-strings out of them .. #. Reverse strings .. #. Replace characters in strings. -.. #. Convert to strings to upper or lower case +.. #. Convert strings to upper or lower case .. #. joining a list of strings .. Prerequisites @@ -84,7 +84,7 @@ using ``s[-1]``. Following is an exercise that you must do. %%1%% Obtain the sub-string excluding the first and last characters -from the string. +from the string s. Please, pause the video here. Do the exercise(s) and then continue. @@ -167,6 +167,8 @@ Please, pause the video here. Do the exercise and then continue. :: + s in week + s.lower()[:3] in week We just convert any input string to lower case and then check if it is @@ -191,7 +193,7 @@ method of strings. Following is an exercise that you must do. -%%3%% Replace the ``[dot]`` with ``.`` +%%3%% Replace the ``[dot]`` with ``.`` in ``email`` Please, pause the video here. Do the exercise and then continue. |