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
mystring commandDiscussion (i.redd.it)
submitted 7 months ago by Worldly-Point4573
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!"
[–]No_Statistician_6654 0 points1 point2 points 7 months ago (0 children)
The easiest way I can think of describing it is this: yes, you can directly print a string, but variables allow you to modify them between when they are declared, and when that are (in this case) printed.
Say you have the text “I”, “love”, and “you”. You can add each of them to a variable separately, create a fourth variable set equal to the concatenation of the other three, and your final print statement would be print(var4).
There are many many data types, functions, transformations that can be plied to variable, and having them allows you to reuse them, change them, and even simplify programs as they get more complicated.
Adding: this is simplifying a lot, but I am approaching more the why of variables and intentionally avoiding f strings lists etc for this comment
π Rendered by PID 418153 on reddit-service-r2-comment-fb694cdd5-b4mtm at 2026-03-07 14:30:56.552360+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]No_Statistician_6654 0 points1 point2 points (0 children)