What will the following code display?
numbers = list(range(1, 10, 2))
for n in numbers:
print(n)
numbers = list(range(1, 10, 2))
for n in numbers:
print(n)
output:
1
3
5
7
9
Here ,in a range we have initialized the range as (1, 10, 2),
The third number indicates the difference between the values of a list.
[so here we get the list(output) ranging from 1 to 10 with difference of 2 between them.]