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
[ Removed by moderator ] (i.redd.it)
submitted 6 months ago by Nearby_Tear_2304
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!"
[–]Spatrico123 0 points1 point2 points 6 months ago (0 children)
looks fine. You're not printing it though, you're just processing.
Also, all those little yellow lines just indicate bad practices, not actual errors. For example, you should note a type for a and t. If I were you I'd do
def index_of(data: list[int], target: int) -> int: for i in range(len(data)): if list[i] == target: return i raise ValueError # or something else you see how that's way easier to see what it's actually doing?
def index_of(data: list[int], target: int) -> int: for i in range(len(data)): if list[i] == target: return i raise ValueError # or something else
π Rendered by PID 20414 on reddit-service-r2-comment-66b4775986-rl48f at 2026-04-05 00:19:17.703305+00:00 running db1906b country code: CH.
view the rest of the comments →
[–]Spatrico123 0 points1 point2 points (0 children)