Lecture 60: Python has some functions

visibility 12 مشاهدة schedule منذ 1 سنة timer 5:49
open_in_new Dailymotion
Python's any() finds whether any of the items in an iterable is truthy. The function returns True if at least one item in the iterable is True or evaluates to True when cast to a Boolean. Although the same output can be achieved using a loop, this built-in function offers a more readable and efficient solution.