Indenting is a visual way of representing blocks of code. In the case of a loop (but also applicable to conditional statements like if statements). It allows you to easily see to where the looped code extends. In most languages (python being a notable exception), the indenting is not important for correct compilation.