Get subdirectories without pycache

def get_subdirectories(directory):
    """ Get subdirectories without pycache """
    return [name for name in os.listdir(directory)
            if name != '__pycache__'
            if os.path.isdir(os.path.join(directory, name))]