[Indic-computing-devel] Re: Iterating over unicode strings
Status: Alpha
Brought to you by:
jkoshy
From: Arun S. <aru...@sh...> - 2002-03-11 04:38:24
|
Sorry - forwarding a newsgroup message failed because of my mail user agent error. Let me try again. -Arun Arun Sharma wrote: > Forgot to mention - using python 2.1 > > -Arun > > Arun Sharma wrote: > >> >> I would like to iterate over the following unicode string one >> character at a time. >> >> line = u"ಡಾ|| ಶಿವರಾಮ ಕಾರಂತ" >> for c in line: >> print c >> >> fails miserably. What is the right way to do it ? I would also like to >> be able to slice the string i.e. line[i] to get the i'th character. >> >> Thanks in advance, >> >> -Arun >> > > |