FOR Loop

For Loop is used to iterate a task number of times. The loop allows traversal over an iterable objects like lists, tuple and strings.

Syntax:

>>> for val in sequence :

. . .      body of for

>>> else:

. . .      body of else part

 

here val is a variable that takes values from the sequence. On each iteration val takes one value from the sequence of iterable object till all items are exhausted.

Flowchart of a Loop Process in Python

LOOP

 

Updated: April 19, 2019 — 11:01 am

Leave a Reply

Your email address will not be published. Required fields are marked *

care4you © 2014 care4you © Revision-1: 2016 care4you © Revision-2: 2019 Connect On Facebook DMCA.com Protection Status
error: Content is protected !!