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
Смотрите видео Passing functions as arguments to other functions онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Python Morsels 13 Июнь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,695 раз и оно понравилось 34 людям.