Find the output
sq = (x*x for x in range(3))
print(next(sq))
print(next(sq))
print(next(sq))
print(next(sq))
0, 1, 4, StopIteration
1, 4, 9, StopIteration
0, 1, 4, 9
Error
This question is part of this quiz :
Python Nation SkillUp Quiz – Day 16 to 29