Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
yield and ASSERTION ERROR #7
When stepping through this program, on second iteration of for loop when entering iterator Tutor starts displaying ASSERTIOn ERRORs, but continues to work properly:
def fibonacci(): a, b = 1, 2 while True: yield a a, b = b, a+b f = fibonacci() for i in range(10): print f.next()