If you only need to know the length of the verts list to iterate through them you can just do sometthing like this:
for vertex in me.verts:
dosomething(vertex)
which I believe is equal to:
for i in range(len(me.verts)):
vertex = me.verts[i]
dosomething(vertex)
though I am not 100% sure that iterations like in the first example follow the same order as in the second. AFAIC Python is particularly oriented to the use of lists, and both iterations should match, but if you are not particularly concerned about the order with wich you are scanning the vertices the first one will do fine and save you a line of code
The fist code should AFAIK be much faster than the second. Because I think the verts are stored in a linked-list or tree or something like that. While the first code goes through all vertices, the second have to search the vertics on position i every loop-iteration! -> in the case of a linked-list the performance of the second code would be O(n^2), while the first code’s performance is only O(n).
But if in some case you can’t use such a for loob, e.g. because you have to iterate two lists of equal length at once, you cold use following code: