summaryrefslogtreecommitdiff
path: root/getting_started_with_strings
diff options
context:
space:
mode:
authorJovina2011-05-18 00:21:35 -0700
committerJovina2011-05-18 00:21:35 -0700
commitfa47e7d73030a891b6583ace2e695ae3a12f4f28 (patch)
tree295b5c3046b54bacb4c8d3f6f6a7081db2aa07f3 /getting_started_with_strings
parentfe04fe42748b4922f61dc9bbfb12272035f61db8 (diff)
downloadst-scripts-fa47e7d73030a891b6583ace2e695ae3a12f4f28.tar.gz
st-scripts-fa47e7d73030a891b6583ace2e695ae3a12f4f28.tar.bz2
st-scripts-fa47e7d73030a891b6583ace2e695ae3a12f4f28.zip
Small changes to 'getting started with strings'.
Diffstat (limited to 'getting_started_with_strings')
-rw-r--r--getting_started_with_strings/script.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/getting_started_with_strings/script.rst b/getting_started_with_strings/script.rst
index d383dcb..6d31bee 100644
--- a/getting_started_with_strings/script.rst
+++ b/getting_started_with_strings/script.rst
@@ -96,9 +96,9 @@ one of the control characters itself is part of the string. For example
By having multiple control characters, we avoid the need for
escaping characters -- in this case the apostrophe.
-Let us now move on to the triple quoted strings. Let us define multi-line strings without
-using any escaping. Everything within the triple quotes is a single
-string no matter how many lines it extends
+Let us now move on to the triple quoted strings. Let us define multi-line
+strings without using any escaping. Everything within the triple quotes is a
+single string no matter how many lines it extends
.. L6
::
@@ -119,9 +119,10 @@ We can assign this string to any variable
.. R8
Now 'a' is a string variable. String is a collection of characters. In
-addition string is an immutable collection which means that the string cannot be modified
-after it is created.So all the operations that are applicable to any other immutable
-collection in Python, works on strings as well. Hence we can add two strings
+addition string is an immutable collection which means that the string cannot
+be modified after it is created.So all the operations that are applicable to any
+other immutable collection in Python, works on strings as well.
+Hence we can add two strings
.. L8
::
@@ -190,8 +191,8 @@ using the subscripts
.. R14
a[0] gives us the first character in the string. The indexing starts from 0
-for the first character and goes up to (n-1) for the last character,where 'n' is the total
-number of characters in a string.
+for the first character and goes up to (n-1) for the last character,where 'n' is
+the total number of characters in a string.
We can access the strings from the end using negative indices
.. L15