reverse words Algorithm
A reverse proxy in such cases could transform HTTPS requests into HTTP requests, buffer incoming requests based on the load of the" shielded" server(s), handle cookies / session data, or transform one request into multiple requests and then synthesize the responses, among other possibility. Quite often, popular web servers use reverse-proxying functionality, shielding application frameworks of weaker HTTP capability.
# Created by sarathkaul on 18/11/19
# Edited by farnswj1 on 4/4/20
def reverse_words(input_str: str) -> str:
"""
Reverses words in a given string
>>> sentence = "I love Python"
>>> reverse_words(sentence) == " ".join(sentence.split()[::-1])
True
>>> reverse_words(sentence)
'Python love I'
"""
return " ".join(reversed(input_str.split(" ")))
if __name__ == "__main__":
print(reverse_words("INPUT STRING"))