I am looking through some text file for a certain string with the method.
re.finditer(pattern,text)
I would like to know when this returns nothing. meaning that it could find nothing in the passed text.
I know that callable iterators, have next()
and __iter__
I would like to know if I could get the size or find out if it returns no string matching my pattern.
Pardon the poorly worded question from before for those of you who read it. I just hit the afternoon wall.