Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Python only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Python
Getting text into list?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
PythonNotSoGuru
New Member
Join Date:
Oct 2007
Posts:
21
#1
Getting text into list?
Apr 7 '09, 01:32 PM
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
Join Date:
Oct 2006
Posts:
2851
#2
Apr 7 '09, 02:01 PM
Code:
>>> s = 'This is a sentence' >>> s.split() ['This', 'is', 'a', 'sentence'] >>>
Comment
Post
Cancel
PythonNotSoGuru
New Member
Join Date:
Oct 2007
Posts:
21
#3
Apr 7 '09, 06:01 PM
why thank you good sir
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment