<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 6, 2013 at 7:16 PM, Roy Smith <span dir="ltr"><<a href="mailto:roy@panix.com" target="_blank">roy@panix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In article <<a href="mailto:mailman.3672.1386373120.18130.python-list@python.org">mailman.3672.1386373120.18130.python-list@python.org</a>>,<br>
<div class="im"> Joel Goldstick <<a href="mailto:joel.goldstick@gmail.com">joel.goldstick@gmail.com</a>> wrote:<br>
<br>
> Python lets you iterate over a list directly, so :<br>
><br>
>     for d in originalData:<br>
>         dateStr, freq, source = d<br>
>         data[source] = freq<br>
<br>
</div>I would make it even simpler:<br>
<br>
>     for dateStr, freq, source in originalData:<br>
>         data[source] = freq<br>
<span class="HOEnZb"><font color="#888888"></font></span></blockquote><div><br><br></div><div>+1 --- I agree<br><br></div><div>To the OP:<br><br></div><div>Could you add a docstring to your function to explain what is supposed to happen, describe the input and output?  If you do that I'm sure you could get some more complete help with your code. <br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">--<br>
<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div>