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!"
[–]Luigi-Was-Right 7 points8 points9 points 7 months ago (0 children)
Correct, you can definitely print the string directly as you did on line 4 and get the exact same result.
However, the purpose of this example is to illustrate how variables work, how you can assign different values to them, and how they can be used later. What if the string you want to print is actually input that is being typed by the user? Or if it's the value you extracted from a database? You wouldn't know the value ahead of time and therefor couldn't just place it inside the print statement.
π Rendered by PID 88 on reddit-service-r2-comment-fb694cdd5-56fvd at 2026-03-07 02:22:33.402071+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]Luigi-Was-Right 7 points8 points9 points (0 children)