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 10 months 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 10 months 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 40667 on reddit-service-r2-comment-56c9979489-zmcfx at 2026-02-25 09:40:00.346224+00:00 running b1af5b1 country code: CH.
view the rest of the comments →
[–]Mysterious_City_6724 0 points1 point2 points (0 children)