How to: Find if any/all values are zero/empty/False #python #shorts

preview_player
Показать описание
How do you find whether any or all values in a list of integers are non-zeros? How to find whether any/all strings in a list are empty? Or How to find any/all boolean values in a list are True? Python has 2 builtin functions for this. This short tutorial covers them in less than a minute. #pyshorts #programming
Рекомендации по теме
Комментарии
Автор

Correction: There's a minor mistake in a comment in one of the code snippets shown. any(["", ""]) is False because all strings are empty in the input list.

codeschool.foobar
join shbcf.ru