Apr-30-2017, 10:45 AM
It's best to return at the end of the function. That's where people expect the return to be, and if they don't see a return statement there, they may assume you don't have one (which implicitly returns None). Note that as a soon as you return a result, the function stops, and control of the program goes back to the point where the function was called. So you certainly want to wait until all the necessary processing gets done before you return a value.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures