PYTHON
BUILD-IN FUNCTIONS
Filter()
Map()
Reduce(
) Zip()
Filter()
The filter function filters a sequence of elements based on a given predicate (a function that returns
a boolean value) and returns a new sequence containing only the elements that meet the predicate.
filter(predicate, iterable)
The predicate argument is a function that returns a boolean value and is applied to each element
in the iterable argument. The iterable argument can be a list, tuple, or any other iterable object.
Map()
The map function applies a function to each element in a sequence and returns a new
sequence containing the transformed elements. The map function has the following syntax:
map(function, iterable)
The function argument is a function that is applied to each element in the iterable argument.
The iterable argument can be a list, tuple, or any other iterable object.
Reduce()
The reduce function is a higher-order function that applies a function to a sequence and returns a
single value. It is a part of the functools module in Python and has the following syntax:
reduce(function, iterable)
The function argument is a function that takes in two arguments and returns a single value. The
iterable argument is a sequence of elements, such as a list or tuple.
Zip()
The zip() function take iterables (can be
zero or more), makes iterator that
aggregates elements based on the
iterables passed, and returns an iterator of
tuples.
zip(function, iterable)
The zip() function returns an iterator of
tuples based on the iterable object.
BASIC TUPLE
OPERATIONS
Index() and Count() Methods
THANK YOU