For loop in python
For loops are used for sequential traversal. For example: traversing a list or string or array etc. The for loop in Python is used to iterate over a sequence (list, tuple, string) or other iterable objects. Iterating over a sequence is called traversal. Let’s quickly work on few examples: Here the variable i is iterated …