author | Puneeth Chaganti <punchagan@fossee.in> |
Tue, 09 Nov 2010 16:16:55 +0530 | |
changeset 424 | 19f49715e83f |
parent 313 | b9b7bfce773e |
child 436 | e62bc810999c |
permissions | -rw-r--r-- |
313
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
1 |
.. Objectives |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
2 |
.. ---------- |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
3 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
4 |
.. At the end of this tutorial, you should know -- |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
5 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
6 |
.. 1. How to define strings |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
7 |
.. #. Different ways of defining a string |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
8 |
.. #. How to concatenate strings |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
9 |
.. #. How to print a string repeatedly |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
10 |
.. #. Accessing individual elements of the string |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
11 |
.. #. Immutability of strings |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
12 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
13 |
.. Prerequisites |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
14 |
.. ------------- |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
15 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
16 |
.. 1. getting started with ipython |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
17 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
18 |
.. Author : Madhu |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
19 |
Internal Reviewer : |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
20 |
External Reviewer : |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
21 |
Checklist OK? : <put date stamp here, if OK> [2010-10-05] |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
22 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
23 |
Script |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
24 |
------ |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
25 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
26 |
{{{ Show the slide containing the title }}} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
27 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
28 |
Hello friends. Welcome to this spoken tutorial on Getting started with |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
29 |
strings. |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
30 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
31 |
{{{ Show the slide containing the outline }}} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
32 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
33 |
In this tutorial, we will learn what do we actually mean by strings in |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
34 |
python, how python supports the use of strings. We will also learn |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
35 |
some of the operations that can be performed on strings. |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
36 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
37 |
{{{ Shift to terminal and start ipython }}} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
38 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
39 |
To begin with let us start ipython, by typing:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
40 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
41 |
ipython |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
42 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
43 |
on the terminal |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
44 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
45 |
So what are strings? In Python anything within either single quotes |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
46 |
or double quotes or triple single quotes or triple double quotes are |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
47 |
strings. This is true whatsoever, even if there is only one character |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
48 |
within the quotes |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
49 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
50 |
{{{ Type in ipython the following and read them as you type }}}:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
51 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
52 |
'This is a string' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
53 |
"This is a string too' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
54 |
'''This is a string as well''' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
55 |
"""This is also a string""" |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
56 |
'p' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
57 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
58 |
Having more than one control character to define strings come as very |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
59 |
handy when one of the control characters itself is part of the |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
60 |
string. For example:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
61 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
62 |
"Python's string manipulation functions are very useful" |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
63 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
64 |
In this case we use single quote for apostrophe. If we had only single |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
65 |
quote to define strings we should have a clumsy way of escaping the |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
66 |
single quote character to make it part of the string. Hence this is a |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
67 |
very handy feature. |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
68 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
69 |
The triple quoted strings let us define multi-lines strings without |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
70 |
using any escaping. Everything within the triple quotes is a single |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
71 |
string no matter how many lines it extends:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
72 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
73 |
"""Having more than one control character to define |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
74 |
strings come as very handy when one of the control |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
75 |
characters itself is part of the string.""" |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
76 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
77 |
We can assign this string to any variable:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
78 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
79 |
a = 'Hello, World!' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
80 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
81 |
Now 'a' is a string variable. String is a collection of characters. In |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
82 |
addition string is an immutable collection. So all the operations that |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
83 |
are applicable to any other immutable collection in Python works on |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
84 |
string as well. So we can add two strings:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
85 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
86 |
a = 'Hello' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
87 |
b = 'World' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
88 |
c = a + ', ' + b + '!' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
89 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
90 |
We can add string variables as well as the strings themselves all in |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
91 |
the same statement. The addition operation performs the concatenation |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
92 |
of two strings. |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
93 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
94 |
Similarly we can multiply a string with an integer:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
95 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
96 |
a = 'Hello' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
97 |
a * 5 |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
98 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
99 |
gives another string in which the original string 'Hello' is repeated |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
100 |
5 times. |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
101 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
102 |
Since strings are collections we can access individual items in the |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
103 |
string using the subscripts:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
104 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
105 |
a[0] |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
106 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
107 |
gives us the first character in the string. The indexing starts from 0 |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
108 |
for the first character up to n-1 for the last character. We can |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
109 |
access the strings from the end using negative indices:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
110 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
111 |
a[-2] |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
112 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
113 |
gives us second element from the end of the string |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
114 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
115 |
Let us attempt to change one of the characters in a string:: |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
116 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
117 |
a = 'hello' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
118 |
a[0] = 'H' |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
119 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
120 |
As said earlier, strings are immutable. We cannot manipulate the |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
121 |
string. Although there are some methods which let us to manipulate the |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
122 |
strings. We will look at them in the advanced session on strings. In |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
123 |
addition to the methods that let us manipulate the strings we have |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
124 |
methods like split which lets us break the string on the specified |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
125 |
separator, the join method which lets us combine the list of strings |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
126 |
into a single string based on the specified separator. |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
127 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
128 |
{{{ Show summary slide }}} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
129 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
130 |
This brings us to the end of another session. In this tutorial session |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
131 |
we learnt |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
132 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
133 |
* How to define strings |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
134 |
* Different ways of defining a string |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
135 |
* String concatenation and repeatition |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
136 |
* Accessing individual elements of the string |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
137 |
* Immutability of strings |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
138 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
139 |
{{{ Show the "sponsored by FOSSEE" slide }}} |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
140 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
141 |
This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
142 |
|
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
143 |
Hope you have enjoyed and found it useful. |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
144 |
Thank you! |
b9b7bfce773e
Getting started with strings LO - script and questions.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
145 |