loop – POFTUT

Powershell ForEach Loop Statement Tutorial with Examples

ForEach is a PowerShell statement used to use iterate or loop over the given list, array or collection of the objects, strings, numbers, etc. ForEach is a very popular loop mechanism where we can use different cases like loop through files, Numbers, Strings, Processes, etc. Powershell version 4.0 brings some performance improvements to the ForEach loop. … Read more

Foreach Usage In PHP, JavaScript, Java, C#, Python Programming Languages with Examples

Loops are an important part of the programming languages. For and While loops are used for decades in different programming languages. Foreach provides similar functionality in a more elegant way by iterating over the given list. In this tutorial, we will examine foreach in different programming languages like PHP, JavaScript, Java, C# and Python. PHP … Read more

How To Enumerate In Python Programming Language?

Python provides easy to use functions and mechanisms for programmers. While dealing with collection or list types we generally need some way to enumerate them. enumerate() function is used to create an iterable or enumerable type from the given list or collection. After this operation, we can use created object to iterate with for or while structures. … Read more

Linux Bash While Loop Tutorial with Examples

Linux Bash While Loop Tutorial with Examples

Linux bash provides a lot of mechanisms to make the system administrator’s life easier. These features are similar to the programming language features like variables, decisions, loops, etc. In this tutorial, we will look loops which can be implemented with for and while we have already examined for loops in the following tutorial. Bash For Loop Examples What … Read more

How To Create Nested For Loops In Python?

While creating applications with python we generally need to use list like or array data structures. If we will iterate over list like data we generally use for loop. But some times the data may have multiple dimensions. In order to cope with multiple dimensions we have to define nested for loops. Nested For Loop for loops can … Read more

How To Loop and Iterate Over Python Dictionary?

How To Loop and Iterate Over Python Dictionary?

Dictionaries provide simple data types with value and key. Dictionary data may be used in an iteration with for loop. By using for mechanism we can iterate over dictionary elements easily. In this tutorial, we will look at different ways to iterate over dictionary elements. Example Dictionary We will use following dictionary type named mydict in this … Read more

How To Linux Bash For Loop In Files?

Bash provides a lot of useful programming functionalities. for loop is one of the most useful of them. We can use for loop for iterative jobs. Linux system administrators generally use for loop to iterate over files and folder. In this tutorial, we will look at how to use for loop to iterate over files … Read more

Linux Bash For Loop Range Examples

Bash for loop is popular programming structure used by a lot of Linux system administrators. For loops can be used in a lot of different cases. We have all ready examined the bash while and for loop in the following tutorial. Bash For and While Loop Examples In this tutorial we will look more specific … Read more

Php – While and Do While Loops

[rps-include post=6522] In previous chapter we have looked for and foreach loops. In this chapter we will look another Php programming language loop while and do while loops. While Loop while loop iterates over given code block unless the condition met. The condition is checked in before every step. If the condition do not meet the while loop will … Read more