17. Review "Functions" space before "if", "elif", "else"


#1



My question is why we have to have a little space before "if", "elif", and "else"? I just don't understand the purpose of this little space? Thanks!

https://www.codecademy.com/courses/python-beginner-c7VZg/4/1?curriculum_id=4f89dab3d788890003000096


def shut_down(s): 
 if s == "yes":
    return"Shutting down"
 elif s == "no":
    return"Shutdown aborted"
 else:
    return "Sorry"


#2

By rights, the 'space' should be an indentation of four spaces inside a function block. Likewise, inside an if block.

def shut_down(s): 
    if s == "yes":
        return"Shutting down"
    elif s == "no":
        return"Shutdown aborted"
    else:
        return "Sorry"

The indentation is an essential part of Python syntax since it denotes block scopes.