Most programming languages use certain characters or keywords to group statements:
Python uses indentation for structuring the code.
All statements with the same distance to the left belong to the same block of code, i.e. the statements within a block line up vertically.
The block ends at a line less indented or the end of the file. If a block has to be more deeply nested, it is simply indented
further to the right.
A statement can be continued on the next line with the continuation character „\“.
for (name, species) in animals:
if species == 'cat':
cats.append(name)
elif species == 'dog':
dogs.append(name)
else:
unknown.append(name)