Python Loops & Control Statements

Python Loops & Control Statements

Control statements and loops are basic building blocks for every programming language. In most of the programming languages, control & loop blocks are identified using curly({}) brackets around the control & loop statements. Since Python does not support curly brackets, it is important to have proper indentation to identify the block. Python code will fail without proper indentation.


Control Statements(IF/ELSE): If Else statements are called control statements. User can either use round brackets or directly specify the control condition.


Loop Statements: Loop statements help to iterate over iteratable objects such as List, Set, Tuple or custom iteration which allows code blocks to be executed repeatedly.


Loop interruption statements: There are 2 loop interruption statement(continue & Break) in Python.