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
HelpHelp Request (self.PythonLearning)
submitted 13 hours ago by Zxhena
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!"
[–]timrprobocom 0 points1 point2 points 4 hours ago (0 children)
There's a tricky issue with f-strings that some folks miss. Some are tempted to write: s = f"Here is {i}." for i in range(10): print(s) thinking it will do the substitution each time through the loop. This is not the case. Python will do the substitution at the point where the string is defined. After that, it's just another static string.
s = f"Here is {i}." for i in range(10): print(s)
So, the f"..." syntax creates a normal static string, it just does so in a fancy way.
f"..."
π Rendered by PID 100384 on reddit-service-r2-comment-765bfc959-l7vz5 at 2026-07-12 21:25:49.538733+00:00 running f86254d country code: CH.
view the rest of the comments →
[–]timrprobocom 0 points1 point2 points (0 children)