Enumerate
Learn about the transforming function, called "enumerate", that transforms an iterable stream.
We'll cover the following
Functional programming prefers iterables over lists because there is less risk of side effects. We often need to transform an iterable stream in some way, and Python provides a number of standard functions to do that.
Example: using enumerate
to iterate a tuple
You may have seen the enumerate
function used in a for loop like this:
Get hands-on with 1400+ tech skills courses.