Higher-order functions
Higher-order functions is about functions that take/return functions, or itertools helpers (chain, cycle, combinations). map/filter/lambda are the fresher versions.
Keep it concrete — map(str.upper, ["a","b"]) → A B. itertools.chain([1],[2,3]) → 1 2 3.
Higher-order functions — output — 7. twice takes a function — that is higher-order.
def square(n):
return n * n
│ square(5)
▼
25Exam tip
One tiny map/filter or itertools line + output.