getting-started-strings/script.rst
changeset 521 88a01948450d
parent 517 71697b10f4ae
equal deleted inserted replaced
520:8249ae9d570a 521:88a01948450d
    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    Checklist OK?       : <put date stamp here, if OK> [2010-10-05]
    21    Language Reviewer   : Bhanukiran
       
    22    Checklist OK?       : <15-11-2010, Anand, OK> [2010-10-05]
    22 
    23 
    23 Script
    24 Script
    24 ------
    25 ------
    25 
    26 
    26 {{{ Show the slide containing the title }}}
    27 {{{ Show the slide containing the title }}}
    29 strings.
    30 strings.
    30 
    31 
    31 {{{ Show the slide containing the outline }}}
    32 {{{ Show the slide containing the outline }}}
    32 
    33 
    33 In this tutorial, we will look at what we really mean by strings, how
    34 In this tutorial, we will look at what we really mean by strings, how
    34 python supports the use of strings and some of the operations that can
    35 Python supports the use of strings and some of the operations that can
    35 be performed on strings. 
    36 be performed on strings. 
    36 
    37 
    37 {{{ Shift to terminal and start ipython }}}
    38 {{{ Shift to terminal and start ipython }}}
    38 
    39 
    39 To begin with let us start ipython, by typing::
    40 To begin with let us start ipython, by typing::
   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.
   172 
   173