for loop in Paython


Prev Tutorial Next Tutorial

for loop in Python

Loops are used in programming to repeat a specific block of code on the basis of certain condition. In python for loop is used for run same sequence number of times.

For Loop Syntax Python

for <variable> in <sequence>:  
for <variable> in <sequence>:  

Python for loop example

num=2  
for i in range (1,6):  
print i

Output

	


Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements