equal
deleted
inserted
replaced
14 .. ------------- |
14 .. ------------- |
15 |
15 |
16 .. 1. getting started with ipython |
16 .. 1. getting started with ipython |
17 |
17 |
18 .. Author : Madhu |
18 .. Author : Madhu |
19 Internal Reviewer : |
19 Internal Reviewer : Punch |
20 External Reviewer : |
20 External Reviewer : |
|
21 Language Reviewer : Bhanukiran |
21 Checklist OK? : <put date stamp here, if OK> [2010-10-05] |
22 Checklist OK? : <put date stamp here, if OK> [2010-10-05] |
22 |
23 |
23 Script |
24 Script |
24 ------ |
25 ------ |
25 |
26 |
160 Let us attempt to change one of the characters in a string:: |
161 Let us attempt to change one of the characters in a string:: |
161 |
162 |
162 a = 'hello' |
163 a = 'hello' |
163 a[0] = 'H' |
164 a[0] = 'H' |
164 |
165 |
165 As said earlier, strings are immutable. We cannot manipulate the |
166 As said earlier, strings are immutable. We cannot manipulate a |
166 string. Although there are some methods which let us to manipulate the |
167 string. Although there are some methods which let us manipulate |
167 strings. We will look at them in the advanced session on strings. In |
168 strings. We will look at them in the advanced session on strings. In |
168 addition to the methods that let us manipulate the strings we have |
169 addition to the methods that let us manipulate the strings we have |
169 methods like split which lets us break the string on the specified |
170 methods like split which lets us break the string on the specified |
170 separator, the join method which lets us combine the list of strings |
171 separator, the join method which lets us combine the list of strings |
171 into a single string based on the specified separator. |
172 into a single string based on the specified separator. |