Generator Expression In Python || Generators || Python

In this we are going to see about Generator Expression in Python, using Generators in Python Programming Language.


squres = (x*x for x in range(5))
print(next(squres))
print(next(squres))
print(next(squres))
print(next(squres))
print(next(squres))

# Coded By Dhiraj Shelke

#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post