WeCodeAcademy
❮ map()any() ❯

filter()

Keeps items where the function is true.

Group: Built-in

Syntax

filter(fn, iterable)

Example

Examplepython
Open in editor »

← All of Python Reference