Mercurial > cpython-lru_cache-weakref
diff Doc/tutorial/introduction.rst @ 43201:4902671dd678
Tutorial formatting patch by Robin Stocker.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Mon, 03 Sep 2007 07:10:24 +0000 |
| parents | 8c1c2d5bed32 |
| children | 7fcd9945d1bf |
line wrap: on
line diff
--- a/Doc/tutorial/introduction.rst Sun Sep 02 15:33:26 2007 +0000 +++ b/Doc/tutorial/introduction.rst Mon Sep 03 07:10:24 2007 +0000 @@ -111,7 +111,7 @@ >>> 1j * 1J (-1+0j) - >>> 1j * complex(0,1) + >>> 1j * complex(0, 1) (-1+0j) >>> 3+1j*3 (3+3j) @@ -271,8 +271,9 @@ Strings can be subscripted (indexed); like in C, the first character of a string has subscript (index) 0. There is no separate character type; a character is -simply a string of size one. As in Icon, substrings can be specified with the -*slice notation*: two indices separated by a colon. :: +simply a string of size one. As in the Icon programming language, substrings +can be specified with the *slice notation*: two indices separated by a colon. +:: >>> word[4] 'A' @@ -523,7 +524,7 @@ You can add something to the end of the list:: - >>> p[1].append('xtra') + >>> p[1].append('xtra') >>> p [1, [2, 3, 'xtra'], 4] >>> q
