Getting text into list?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PythonNotSoGuru
    New Member
    • Oct 2007
    • 21

    Getting text into list?

    Hey all im wondering if there is a way to take user input in format of a sentence and store it in the list by word. So like take text input and then each word in the input becomes an entry in a list. Any help?

    code [python]
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Code:
    >>> s = 'This is a sentence'
    >>> s.split()
    ['This', 'is', 'a', 'sentence']
    >>>

    Comment

    • PythonNotSoGuru
      New Member
      • Oct 2007
      • 21

      #3
      why thank you good sir

      Comment

      Working...