This article serves as a complete reference for all the non-trivial things you should know about Python functions.
Grab a piece of paper and try to fold your way out of this problem.