Convert String to list of chars

Vlad Dogaru ddvlad at gmail.com
Sat Jan 27 10:10:13 CET 2007


On Jan 27, 9:18 am, Neil Cerutti <horp... at yahoo.com> wrote:
> On 2007-01-27, juanef... at gmail.com <juanef... at gmail.com> wrote:
>
> > How can I convert a string to a char list?
> > for example
>
> > "hello" --> ['h','e','l','l','o']
>
> > I have been searching but I can't find my answers
> list("hello")

Wow, I've been using [c for c in 'hello'] for as long as I can remember
needing it. Thanks!

Vlad




More information about the Python-list mailing list