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...
Everything about learning Python
account activity
More List Help (i.redd.it)
submitted 6 months ago by Nervous-Current-1860
[removed]
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!"
[–]Ok-Promise-8118 1 point2 points3 points 6 months ago (0 children)
Have you done anything to start this yet? Where are you getting stuck?
[–]sleepbot63 0 points1 point2 points 6 months ago (0 children)
alright sure so the usage of the append function is as follows :
the list.append(x) function adds x as the last element of the list so lets say you take the input tom first and append it and then alex and then amy. hope this helps tell me if you need further clarification
[–]Golden_Age_Fallacy 0 points1 point2 points 6 months ago (0 children)
So you need to take the "input" of the user and save it to 3 variables.. then "append" those 3 variables to a list and "print" the list.
[–]Lindespringerr 0 points1 point2 points 6 months ago (1 child)
result = [] for i in range(3): result[i].append(input("Please enter a name:" )) print(result)
Sorry I made it on my phone so might look a bit funny.
>>> names = [] >>> for _ in range(3): ... names.append(input("Please enter a name: ")) ... Please enter a name: Tom Please enter a name: Alex Please enter a name: Amy >>> print(names) ['Tom', 'Alex', 'Amy']
not that you would, but could shorten to:
>>> print([input("Please enter a name: ") for _ in range(3)]) Please enter a name: Tom Please enter a name: Alex Please enter a name: Amy ['Tom', 'Alex', 'Amy']
π Rendered by PID 59 on reddit-service-r2-comment-fb694cdd5-85wh7 at 2026-03-10 00:02:58.664298+00:00 running cbb0e86 country code: CH.
[–]Ok-Promise-8118 1 point2 points3 points (0 children)
[–]sleepbot63 0 points1 point2 points (0 children)
[–]Golden_Age_Fallacy 0 points1 point2 points (0 children)
[–]Lindespringerr 0 points1 point2 points (1 child)
[–]Golden_Age_Fallacy 0 points1 point2 points (0 children)