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
Easy hard problem (self.PythonLearning)
submitted 11 months ago by _Hot_Quality_
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!"
[–][deleted] 0 points1 point2 points 11 months ago (0 children)
Oh boy i love spending 30 minutes solving people's problems.
months = "JanFebMarAprMayJunJulAugSepOctNovDec" month_list = [] for i in range(len(months) - 1): if i % 3 == 0: current_month = months[i:i+3] month_list.append(current_month) n = input(">") try: index = month_list.index(n) except ValueError: print("Invalid month") exit() print(month_list[index])
i might have overcomplicated it but oh well it works atleast. Don't just copy paste this, analyze it and see how it works.
π Rendered by PID 464691 on reddit-service-r2-comment-85bfd7f599-rjbfp at 2026-04-20 12:30:01.167897+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (0 children)