09:01Python higher order functions π
From the creator
Python higher order functions tutorial example explained #python #higher-order #functions # Higher Order Function = a function that either: # 1. accepts a function as an argument # or # 2. returns a function # (In python, functions are also treated as objects) # ----- 1. accepts a function as an argument ----- def loud(text): return text.upper() def quiet(text): return text.lower() def hello(func): text = func("Hello") print(text) hello(loud) hello(quiet) # ------------ 2. returns a function ------------- #def divisor(x): #def dividend(y): #return y / x #return dividend #divide = divisor(2) #print(divide(10)) Bro Code merch store π : =========================================================== https://teespring.com/stores/bro-code-5 =========================================================== music credits πΌ : =========================================================== Up In My Jam (All Of A Sudden) by - Kubbi https://soundcloud.com/kubbi Creative Commons β Attribution-ShareAlike 3.0 Unportedβ CC BY-SA 3.0 Free Download / Stream: http://bit.ly/2JnDfCE Music promoted by Audio Library https://youtu.be/tDexBj46oNI ===========================================================
Published 2021-01-11 Β· Watch on YouTube β
Availability and playback restrictions are controlled by the original channel.





