Learn Python functions - Pass list of functions as parameter

Pubblicato il: 29 gennaio 2016
sul canale di: SIMPLECODE
3,271
6

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...
=====================================


In questa pagina del sito puoi guardare il video online Learn Python functions - Pass list of functions as parameter della durata di ore minuti seconda in buona qualità , che l'utente ha caricato SIMPLECODE 29 gennaio 2016, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 3,271 volte e gli è piaciuto 6 spettatori. Buona visione!