Category Python

Switch Statement in Python

Unlike other programming languages like C/C++/Java, Python does not have any dedicated switch case statement. A switch statement is a multiway decision statement that executes a statement by comparing the value of a variable to the values specified in the…

Conditional Statements in Python

Types of control flow statements in Python

In this tutorial, we will learn about conditional statements or decision-making statements in Python with the help of general flowchart diagram. A simple program written in Python consists of a set of statements that contain expressions. An expression is a…

Python Pass Statement

Flowchart diagram of pass statement in Python

The pass statement in Python is a simple statement that tells the Python interpreter to ‘do nothing’. The interpreter simply continues with the execution of program whenever the pass statement is executed. This amazing feature makes it a good placeholder…

Python Continue Statement

Python continue statement example

Continue in Python is a loop control statement similar to the break statement. It breaks the current execution (iteration) of loop and transfers the program control back to the beginning of the loop for the next execution without exiting the…

Break Statement in Python

Flowchart diagram of break statement in Python

A break statement in Python is a loop control statement that ends the present loop statement and instructs Python to execute the next statement immediately following the loop. It provides a greater control over the execution of statements in a…