Passing functions as arguments to other functions

Published: 13 June 2022
on channel: Python Morsels
1,695
34

In Python, you can pass functions (as an argument) to another function. Some of Python's built-in functions actually expect functions to be given as one or more of their arguments to call them later.

Read an article version of this video at https://pym.dev/passing-functions-arg...

Find more Python screencasts at https://pym.dev/screencasts/

00:00 Sorting strings
00:28 Passing a key function to sorted
01:37 Writing a function that accepts a function as an argument
02:30 Recap


Watch video Passing functions as arguments to other functions online without registration, duration hours minute second in high quality. This video was added by user Python Morsels 13 June 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,695 once and liked it 34 people.