Timeline for Converting a string into a list in Python
Current License: CC BY-SA 2.5
Post Revisions
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 16, 2025 at 14:43 | answer | added | David Aniebo | timeline score: 1 | |
| Jan 16, 2025 at 4:43 | answer | added | Robert Goddard-Wright | timeline score: 0 | |
| Mar 30, 2010 at 21:41 | answer | added | rlotun | timeline score: 1 | |
| Mar 30, 2010 at 13:29 | vote | accept | Sam | ||
| Mar 30, 2010 at 13:18 | history | edited | SilentGhost | CC BY-SA 2.5 |
edited body; edited tags
|
| Mar 30, 2010 at 13:17 | comment | added | Omnifarious | Your question admits of too many possibilities. Does the text file only contain a list of numbers, or is that list in a larger context. Do you get to control how you read from the document or are you stuck with having read a string that contains a bunch of newline or whitespace separated numbers? Are the numbers in the list always separated by newlines, or are they sometimes separated by other whitespace? Do you really want a list of strings as your result, or would a list of integers be better? | |
| Mar 30, 2010 at 13:16 | answer | added | rytis | timeline score: 1 | |
| Mar 30, 2010 at 13:15 | comment | added | Eric Wilson |
Do you really want ['1000','2000','3000','4000']? Maybe [1000,2000,3000,4000] would be better?
|
|
| Mar 30, 2010 at 13:14 | answer | added | Nikola Smiljanić | timeline score: 0 | |
| Mar 30, 2010 at 13:14 | answer | added | Eli Bendersky | timeline score: 26 | |
| Mar 30, 2010 at 13:13 | answer | added | dbr | timeline score: 1 | |
| Mar 30, 2010 at 13:11 | history | asked | Sam | CC BY-SA 2.5 |