Decode the Morse Code
Iterating in Python

In Python if you find yourself writing something like:

while index &lt; (length):   


There is good chance you are not writing Pythonic code.  Looping over an index is just not needed that often.  I will start with showing some ways to improve your code.  And then at the end will show a more Pythonic solution.

I would suggest changing your looping statement to:

for index, di_dah in enumerate(morse_code.strip() + ' '):


enumerate() is used to iterate over an object and give the index of of the current element.  The str.strip() removes leading and trailing spaces, and the + ' ' at the end removes the need special casing after the loop.  This fairly simple change can greatly simplify the code needed inside the loop:

def decodeMorse2(morse_code):
    clear_text = ''
    char = ''

    for index, di_dah in enumerate(morse_code.strip() + ' '):
        if di_dah != ' ':
            char += di_dah
        elif char:
            clear_text += MORSE_CODE[char]
            char = ''
            if index &lt; len(morse_code) - 2:
                if morse_code[index: index + 3] == '   ':
                    clear_text += " "

    return clear_text    


More Pythonic?

I don't have access to the test cases, but I read the spec I think this would do the job:

def decodeMorse(morse_code):
    return ' '.join(
        ''.join(MORSE_CODE[char] for char in word.split())
        for word in morse_code.strip().split('   ')
    )


How does this work?

This code uses two nested loops in the form of generator expressions.  It uses str.split() to initially split the words in the outer loop and then again to split the characters in the inner loop.  Then does a character lookup and finally uses str.join() to build the sentence.