Loops (Iterative
Statements)
Example:
s="Hyderabad"
for a in range(5):
print(s)
If we want to execute a group
statements (or single statement) multiple times then we use Iterative
statements:
There are two types:
1.
for loop
2.
while loop
for loop:
If we want to execute some
action for every element present in some sequence.
Syntax:
for variable in sequence:
body
note: sequence means string,list,set,tuple or any other
collections.
Assignment:
Next Topic: for loop
Previous Topic: if..elif..else statemnet
This information is really awesome thanks for sharing most valuable information.
ReplyDeletePython Institute in Hyderabad
Python Online Training in Hyderabad
Python Training in Hyderabad
Python Training
Python Online Training