Skip to content

Instantly share code, notes, and snippets.

if __name__ == '__main__':
#fibonnacci sequence in a lazy list.
@lazylist
def fibgen(lst):
yield 0
yield 1
for a, b in itertools.izip(lst, lst[1:]):
yield a + b
fibs = fibgen() #now fibs can be indexed or iterated over as if it were
Herbert has joined this session!
Connected with Herbert. Your reference number for this chat session is 2110638.
Herbert: Welcome to Microsoft Customer Service Chat, Tom. Please give me a moment while I review your question.
Herbert: Please be informed that this chat service is available to guide you to the appropriate resources for your questions. Often this can include technical support options or a phone number to the appropriate Microsoft team.
We couldn’t find that file to show.