Navigating Callable-Iterators
<p>I'd like to use regular expressions to extract information out of some chat logs. The format of the strings being parsed are <code>03:22:32 PM &lt;b&gt;blcArmadillo&lt;/b&gt;</code>. I used the python type() command to find that the variable messages is a callable-iterator. My question is how do I most efficiently navigate through a callable-iterator? Are they like arrays where you can just use an index? The only way I could find to "extract" the data was to loop through the returned values and add them to a list as shown in the code snipet below.</p>

<pre><code>times = []
messages = re.compile(r'(?P&lt;time&gt;..:..:.. ..).*?&lt;b&gt;(?P&lt;usrname&gt;.*?):&lt;/b&gt;').finditer(search)

for result in messages:
    times.append(result.group('time'))
</code></pre>

<p>Is there a better more effiecnt way of doing this? Thanks for the help.</p>
