Built-in Functions in Python
Trey talks about a number of built-in functions but I only listed a couple that I didn’t know.
enumerate
If you need to count upward, one number at a time while looping over an
iterable at the same time, the enumerate function will come in hand.
| |
If you are using range(len(sequence)), you should use enumerate instead.
zip
The zip function is used for looping over multiple iterables at the same
time.
| |