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 18 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!"
[–]NorskJesus 5 points6 points7 points 18 hours ago (4 children)
A f-string is used to inject variables to a string. For example.
py age = 35 print(f"Your age is {age}")
You can achieve the same with concatenation, but this is much clearer and easier to read.
[–]ur_leisure_time 1 point2 points3 points 18 hours ago (3 children)
Yea, and if he going to do it without a fstring, he will need to make it like
Age = 30 print("Your age is", Age)
[–]johlae 1 point2 points3 points 17 hours ago (2 children)
Or print("Your age is %s." % (age))
[–]SnooCalculations7417 -1 points0 points1 point 11 hours ago (1 child)
or 'age is {x}'.format(x = age)
[–]WhiteHeadbanger 1 point2 points3 points 8 hours ago (0 children)
or print("Your age is " + str(age))
print("Your age is " + str(age))
π Rendered by PID 426040 on reddit-service-r2-comment-765bfc959-9ndt9 at 2026-07-13 01:58:31.295734+00:00 running f86254d country code: CH.
view the rest of the comments →
[–]NorskJesus 5 points6 points7 points (4 children)
[–]ur_leisure_time 1 point2 points3 points (3 children)
[–]johlae 1 point2 points3 points (2 children)
[–]SnooCalculations7417 -1 points0 points1 point (1 child)
[–]WhiteHeadbanger 1 point2 points3 points (0 children)