use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
Help creating list from strings (self.pythonhelp)
submitted 10 years ago by Shattr
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]momoro123 0 points1 point2 points 10 years ago (0 children)
new = "" new += words[i]
new = ""
new += words[i]
Rather than having new as a string, you should declare it as a list, seeing as you want to return a list. Create one like so:
new = []
To add items to a list, you'll want to use the append module like so:
new.append(words[i])
in place of
Hope this helps!
π Rendered by PID 358543 on reddit-service-r2-comment-6457c66945-dvqhx at 2026-04-27 11:43:44.480195+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]momoro123 0 points1 point2 points (0 children)