Skip to main content
๐Ÿ”ฎ Output PredictionPY Python Hard+35 XP

Generator Expression

What is the output?

Python
gen = (x**2 for x in range(3))
print(next(gen))
print(next(gen))

๐Ÿ”ฎ What is the output?

Priygop - Leading Professional Development Platform | Expert Courses & Interview Prep