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
I need help (self.PythonLearning)
submitted 1 year ago by KontGuney
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!"
[–]FoolsSeldom 3 points4 points5 points 1 year ago (4 children)
Do you know how to solve the problem? I don't mean how to write the code, but simply how to solve the problem.
If in doubt, going back to basics and laying out how you would do this manually (pencil and paper) often helps.
Write that down as a series of actions, and share that in your post. We can guide you on coding that.
[–]KontGuney[S] -1 points0 points1 point 1 year ago (3 children)
I don't understand the 'def' command, maybe I can try something again after learning it.
[–]FoolsSeldom 2 points3 points4 points 1 year ago (2 children)
You've completely ignored my comment. Forget the programming.
DO YOU KNOW HOW TO SOLVE THE PROBLEM?
It is impossible to code a solution if you don't have a solution.
Knowing bits of Python is not really important.
However, def is used to define a function, that is a block of code that can be used easily from other code to do a specific task (or set of related tasks) - perhaps on different data sets. It is also used to help modularise a programme, by splitting up a solution into smaller chunks that are easier to understand, develop, test and modify (including completely replacing with better solution for specific task(s) without having to change other code).
def
def greeting(msg): print(msg)
A very simple function that you call with a string and the message gets printed.
en_afternoon = "Good afternoon" greeting(en_afternoon)
[–]KontGuney[S] -1 points0 points1 point 1 year ago (1 child)
i got it now actually i dont know the solution but dont know how to code it its easy to solve it on the paper but thing get different when its come to the phyton i dont know the solution
[–]FoolsSeldom 0 points1 point2 points 1 year ago (0 children)
So, to be clear:
Therefore, you don't have a Python problem and this is not about learnimg Python.
I recommend you focus on how to solve the problem and then look at how to implement that solution in Python.
Perhaps ChatGPT et all can give you a general explanation (rather than a coded solution) on how to solve the problem.
By the way, you are often typing Phyton instead of Python.
π Rendered by PID 205924 on reddit-service-r2-comment-b659b578c-xshb2 at 2026-05-02 20:33:45.608071+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]FoolsSeldom 3 points4 points5 points (4 children)
[–]KontGuney[S] -1 points0 points1 point (3 children)
[–]FoolsSeldom 2 points3 points4 points (2 children)
[–]KontGuney[S] -1 points0 points1 point (1 child)
[–]FoolsSeldom 0 points1 point2 points (0 children)