How to use filter() in Python 3 to write a program

Опубликовано: 10 Июль 2017
на канале: Cool Python Codes
58
0

Let’s be practical, when you pour water that has particles into a filter, the water passes through the filter but the particles remain in the filter.

A filter function does the work of a filter.

A filter() function returns a sequence for which a function is true, I.e. the items you don’t want are discarded.

The syntax of the filter() function is:

list(filter(Boolean_function, sequence))

What I mean by a Boolean_function is a user-define function that returns a True or False value

Thank you so much for watching!

If you’d like to see more about filter(), map() and lambda, head over to http://coolpythoncodes.com/python-fun... for more free content.


На этой странице сайта вы можете посмотреть видео онлайн How to use filter() in Python 3 to write a program длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Cool Python Codes 10 Июль 2017, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 58 раз и оно понравилось 0 зрителям. Приятного просмотра!