def reverse_str(s):
    """Reverses the words in a sting and returns the new string to the
    caller. A word in this context is defined as any space seperated
    sequence of non-whitespace characters.
    """
    s_list = s.strip().split(' ')
    s_list.reverse()
    rs = ''
    for word in s_list:
        rs = rs + ' ' + word
    return rs.strip()