r/PythonLearning • • Oct 23 '26

Help Request Def return

I'm stuck in def return in python I don't understand it very well why is it used and how and where does the code return to ? The caller ? What is exactly the caller ?

Thank you so much for helping me

If you don't mind can u help me understand with examples ? Couldn't understand this with Chatgpt and yt

0 Upvotes

21 comments sorted by

View all comments

0

u/ninhaomah Oct 23 '26

Perhaps can OP can define what he meant by "def return" with an example code for discussion ?

Or you can read what others explain.

Up to you. 

For me , I rather take part in the discussion so I learn effectively from those better than me instead of just reading what they say.