[Python] Use enumerate() function to output index and element at the same time
Introduction
enumerate()
is a function often used in Python. Its usage is very simple, just only need use enumerate(iterable, start_index)
. The first parameter enters the iterable object, and the second parameter enters the first number to be counted (Calculate from 0 by default).
Let’s take a look at a simple sample code.
Read More »[Python] Use enumerate() function to output index and element at the same time