Python program to Reverse Word Sequence

def string_rev(str): str = str.split() str.reverse() return ' '.join(str) print(string_rev(input("Insert some strings: ")))

 

 

Output:

 

Insert some strings: my python course
course python my