MENU
Question -

Write the syntax of a for loop and also given an example.



Answer -

The syntax of a for loop looks as follows : for iterating_var in sequence: statements(s)
Example : for i in range (4):
print i
output : 0 1 2 3

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×