0
even number=list(range)(2,11,2).why range function takes third argument in range or step size starting from 2 not 1.
2 Respuestas
+ 3
The method has more overloads (possibilities). One of this as above mentioned.
First argument is here the start value and the last step.
+ 2
When not explicitly specified, range() uses 1 for stepping as default.
even_number = list( range( 2, 11, 2 ) ) means the `list` will be populated with values from 2 up to 11 exclusively, and each value inserted to the `list` will dffer by 2 ~ the stepping value.