def partition(message):
    """
    Takes in a decoded message (presumably passed through prepare()) and
    returns a list of all contained messages. The messages are strings

    Example:

    >>> partition("5   Hello6   World!")
    ['Hello', 'World!']
    """

    messages = []

    while len(message) > 0:

        prefix = message[:4].strip()

        try:
            msg_len = int(prefix)

        except ValueError:
            print("Erroneous message prefix:", prefix)

            msg_len = len(message)              # assume that all that's left is this message

        messages.append(message[4:4+msg_len])   # add message
        message = message[4+msg_len:]           # slice past current message to next message

    return messages