for loop python odd numbers code example
Example 1: python for loop even numbers
for i in range(2,11,2): # range(start, end, step)
print(i)
Example 2: how to get odd numbers in python
# Here, rnge means range
rnge = int(input("Enter the range: "))
for i in range(1, rnge, 2):
print(i)