n chime in.
On Wed, May 7, 2014 at 8:39 PM, C Smith wrote:
> On Wed, May 7, 2014 at 7:55 PM, Joe Cortes wrote:
>> Welcome to the wonderful world of generators!
>>
>> Looking at your code, you'll notice two things. First, you're
>> iterating over all the numb
Welcome to the wonderful world of generators!
Looking at your code, you'll notice two things. First, you're
iterating over all the numbers twice: once to calculate them, and then
another time to actually do the sum. What's worse, at any given point
in time, you're only really using fibs[-1] and fi