# function that takes a string and returns string with reversed words
def reverse_words(string):
    # split string into list of words
    words = string.split()
    # reverse list of words
    words.reverse()
    # join reversed list of words into string
    return " ".join(words)


if __name__ == "__main__":
    s = input("Enter a string: ")
    print(reverse_words(s))

e6034d4634c20243f39dbf699c313fa93c4a513f
<mask token>

def reverse_words(string):
    words = string.split()
    words.reverse()
    return ' '.join(words)


<mask token>

def reverse_words(string):
    words = string.split()
    words.reverse()
    return ' '.join(words)


if __name__ == '__main__':
    s = input('Enter a string: ')
    print(reverse_words(s))

# function that takes a string and returns string with reversed words
def reverse_words(string):
    # split string into list of words
    words = string.split()
    # reverse list of words
    words.reverse()
    # join reversed list of words into string
    return " ".join(words)


if __name__ == "__main__":
    s = input("Enter a string: ")
    print(reverse_words(s))
