In this we are going to see how to print Even Numbers in Python Using for loop, using Generators in Python Programming Language.
def simple():
for i in range(10):
if(i % 2 == 0):
yield i
for i in simple():
print(i)
# Coded By Dhiraj Shelke
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP