All posts by Tuna Peyo

The while loop

Jul 20,97

The while loop in Python is used to repeatedly execute statements as long as the given condition is true. When …

Read More

Use else statement in loops

Jul 19,97

You can use the else statement in the for and while loops in Python. The else statement is optional and executes …

Read More

The pass statement

Jul 19,97

The pass statement in Python usually serves as a placeholder to ensure that the block has at least one statement. …

Read More

The continue statement

Jul 18,97

The continue statement in Python is used to skip the rest of the code inside a loop for the current …

Read More

The break statement

Jul 18,97

The break statement  is used to terminate a loop in Python. It is usually used inside an if statement that defines …

Read More

Use for loop with the range() function

Jul 17,97

The range() function in Python is often used in for statements to define the number of loop iterations. This built-in …

Read More
Geek University 2022