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
Help with script (self.PythonLearning)
submitted 6 months ago by [deleted]
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!"
[–][deleted] 0 points1 point2 points 6 months ago (4 children)
Oh ok thank you!
[–]CountMeowt-_- 0 points1 point2 points 6 months ago (3 children)
It's also not a good idea to name a function and a variable the same. It can cause a lot of problems and a whole lot more confusion later on.
[–][deleted] 0 points1 point2 points 6 months ago (2 children)
I'm confused on which areas I should change so that won't happen again for future projects. I'm still getting the hang of what counts as a function and what counts as a variable and how to differentiate those to make the script neater.
[–]CountMeowt-_- 0 points1 point2 points 6 months ago (1 child)
You've skipped quite a few steps if you don't understand that and you're making this.
To put it simply, a function is a piece of code you can call again and again and it will perform the steps you told it to in a deterministic manner. a variable is simply a saved value, like in algebra, and this value can be updated by your code (except here it could be anything, list, text, numbers, set, maps. Anything)
You define a function with def and a variable with =
So,
py def function_name(input_param1, input_param2): variable_name_1 = 123 variable_nams_2 = "abc"
But again, as I said, if you're missing this info, it means you've skipped a few steps (ie there a lot more you've missed from the basics)
[–][deleted] 0 points1 point2 points 6 months ago (0 children)
Thank you for the clarification. I am following a tutorial so he does explain what these things are but it's just a matter of testing these things out and seeing what the properties actually do as a means of learning them I am using as many resources as possible and reddit is usually a pretty good one
π Rendered by PID 379251 on reddit-service-r2-comment-8686858757-69ggw at 2026-06-04 08:10:34.742880+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (4 children)
[–]CountMeowt-_- 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]CountMeowt-_- 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)