[Tutor] query

Sander Sweers sander.sweers at gmail.com
Sun Jan 31 22:33:16 CET 2010


On 31 January 2010 22:21, invincible patriot
<invincible_patriot at hotmail.com> wrote:
> can any one tel me how can i do indexing of individual characters in python
> like if i hav a word eg david
> a='david'
> b=list(a)
> # this will give ['d','a','v','i','d']
> not i want to print the index of each character
> how can i do that
> please tel me

Look at http://diveintopython.org/getting_to_know_python/lists.html.

Greets
Sander


More information about the Tutor mailing list