def word_len(word):
    """Returns the length of word not counting spaces

    >>> word_len("a la carte")
    8
    >>> word_len("hello")
    5
    >>> word_len('')
    0
    >>> word_len("coup d'etat")
    10
    """
    num = len(word)
    for i in range(len(word)):
        if word[i] == " ":
            num = num-1
    return num