diff options
author | Nishanth Amuluru | 2010-10-11 22:44:21 +0530 |
---|---|---|
committer | Nishanth Amuluru | 2010-10-11 22:44:21 +0530 |
commit | 0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03 (patch) | |
tree | 23e39471c705058c10961ff465517a664abbef43 /manipulating-strings/script.rst | |
parent | c777a70b51353182bcfadaaff9deb2b9d09cf9a2 (diff) | |
parent | 81a76e18a1b11c9565ee198d7ae58bd49d9b3acb (diff) | |
download | st-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.tar.gz st-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.tar.bz2 st-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.zip |
merged
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. |