Write a note on the range () in the loop?
Advertisements
Advertisements
Question
Write a note on the range () in the loop?
Advertisements
Solution
Usually in Python, for loop uses the range() function in the sequence to specify the initial, final, and increment values. range() generates a list of values starting from start till stop – 1.
APPEARS IN
RELATED QUESTIONS
How many important control structures are there in Python?
Which statement is generally used as a placeholder?
Which is the most comfortable loop?
What is the output of the following snippet?
T=1
while T:
print(True)
break
List the control structures in Python.
Define control structure.
Write a program to display.
A
A B
A B C
A B C D
A B C D E
Using if..else..Elif statement writes a suitable program to display the largest of 3 numbers.
Write a program to display all 3 digit odd numbers.
Write a program to display a multiplication table for a given number.
