I'm new to python ,and just trying to figure out why two ways? any specific reason? which one is better?
I've tried searching but not able to find it.
I'm new to python ,and just trying to figure out why two ways? any specific reason? which one is better?
I've tried searching but not able to find it.
The simplest answer is that the justification is similar for next(x)
as it is for len(x)
. Fredrik Lund summarises Guido's response on that topic in this article.