Sep-13-2018, 01:45 AM
With a return statement:
def add_two(x): return x + 2
Output:>>> y = add_two(3)
>>> y
5
I'm not sure exactly what should be returned out of your function, but you would use the return statement to do it. If this is new to you, you should check out the functions tutorial (link in my signature below).
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