1.

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



Discussion

No Comment Found