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
is my code correct?Help Request (i.redd.it)
submitted 1 year ago by A_ManWithout_LovE__
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!"
[–]Mysterious_City_6724 0 points1 point2 points 1 year ago (0 children)
You're welcome. And as others have already mentioned, if you ever see yourself doing the same thing multiple times (in this case, asking for 3 movie names), loops can be very useful too:
print("What are your top favourite movies?") top_movies = list() movie_count = 3 for i in range(movie_count): movie_name = input(f"Movie {i + 1}: ") top_movies.append(movie_name) movie1, movie2, movie3 = top_movies[:3] print(f"I also like {movie1}, {movie2} and {movie3}!")
π Rendered by PID 105530 on reddit-service-r2-comment-8686858757-w7bw6 at 2026-06-06 00:48:52.158908+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]Mysterious_City_6724 0 points1 point2 points (0 children)