Convert String to list of chars

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • juanefren@gmail.com

    #1

    Convert String to list of chars

    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

    thanks

    --
    Juan Efrén Castillo Encinas
  • Neil Cerutti

    #2
    Re: Convert String to list of chars

    On 2007-01-27, juanefren@gmail .com <juanefren@gmai l.comwrote:
    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")

    Comment

    • Vlad Dogaru

      #3
      Re: Convert String to list of chars

      On Jan 27, 9:18 am, Neil Cerutti <horp...@yahoo. comwrote:
      On 2007-01-27, juanef...@gmail .com <juanef...@gmai l.comwrote:
      >
      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

      Comment

      Working...