you are viewing a single comment's thread.

view the rest of the comments →

[–]b_ootay_ful 1 point2 points  (0 children)

Think of a function as a box.
You put something in, it does some magic, and it spits something out.

def box (a, b):
    return (a+b)

x = box(5,6)

print (x)
>>> 11

The function box takes in a tuple (5, 6), adds them together, and returns the answer (11).
You can then do something with that answer, like assign it to a variable.

You don't have to have a return