Another cool trick that I`ve learned recently - how to pass a list of functions as a function parameter. Let`s say we want to increment a number by 1 and then square it. We will write a function that accepts two parameters - list of functions (which will be separate functions like increase, square, decrease, etc) and a number to which these functions will be applied to. So, our function call will be something like this:
applyList([increase, square], 9), and output value will be 100
=====================================
SUBSCRIBE FOR MORE:
http://www.youtube.com/subscription_c...
=====================================
На этой странице сайта вы можете посмотреть видео онлайн Learn Python functions - Pass list of functions as parameter длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь SIMPLECODE 29 Январь 2016, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 3,271 раз и оно понравилось 6 зрителям. Приятного просмотра!