Advertisements
Advertisements
प्रश्न
Find the output of the following program segment:
for i in range(20,30,2):
print(i)टीपा लिहा
Advertisements
उत्तर
The range(start, stop, step) function will create a list from the start value to the stop value(excluding the stop value) with a difference in the step value.
The list thus created will be [20, 22, 24, 26, 28].
OUTPUT:
20
22
24
26
28
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Flow of Control - Exercise [पृष्ठ १४०]
