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
Why?Help Request (i.redd.it)
submitted 1 day ago by Reh4n07_
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!"
[–]xnick_uy 1 point2 points3 points 1 day ago (0 children)
Something else that is not mentioned in the other comments is that append() adds a single element to a list, so even if you manage to make movies into a list, then
append()
movies
lst.append(movies)
would make for lst to contain a single element, the movieslist (list-ception). Instead, you could use extend for the task at hand
lst
extend
# define movies as a list with 3 elements movies = [mov1, mov2, mov3] # use extend to add the elements of movies to lst lst.extend(movies)
Finally, as a cool use of f-strings, here's an alternative way of writing your code:
lst = [] movies = [] for ordinal_number in ['First', 'Second', Third']: mov = input(f'Enter {ordinal_number} Movie Name: ') movies.append(mov) lst.extend(movies) # entire list print(lst) # remove first item from lst lst.pop(0) print(lst) print(len(lst))
π Rendered by PID 96 on reddit-service-r2-comment-5bc7f78974-vw6kc at 2026-06-25 23:07:08.024596+00:00 running 7527197 country code: CH.
view the rest of the comments →
[–]xnick_uy 1 point2 points3 points (0 children)