What does this error mean ? "Expected an indented block" Python

Python uses (requires) indentation to identify blocks in your code. For example:

def value(one,two):
    if one < two: 
        return two
    else:
        return one

You have something along the lines of:

def value(one,two):
if one < two: 
return two
else:
return one

Which yields the error you are seeing.

Browse More Popular Posts

Leave a Comment