Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Scripting >> Examples >> Python-Perl-Powershell-Bash-Windows Batch >> Example 003 - How to perform for loop with a loop iteration counter


To perform an iteration using a for loop.


Examples in Python, Perl, Powershell, Bash and Windows batch.
 

 

 

 

 

 

 

 

 

 

 

 

 

## NOTES:
## 1. In Python, the range(start,stop,step) function, generates a list of integers
## from start, to stop-step, in increments of step
## so range(1,6,1) generates 1,2,3,4,5
##
## END ##

 

Sample output - Python

 

Sample output - Perl


 

 

Sample output - Powershell

 

 

Sample output - Bash

 

 

Sample output - Windows batch

 

 

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]