Functional python tutorial