Accenture Coding Question | Reverse String Wordwise | CodeWindow

Reverse String Word Wise

Write a function to reverse a string word-wise.

Input specification:
Input 1: String

Output Specification:
Return the reversed string that is the last word in input string should come at the first position of the output string second last word at he second position and so on., individual words should remain same.

Example 1:
Input 1: Welcome to code.
Output : code to Welcome

Reversed string word wise

Example 2:
Input 1: Code to Crack Puzzle
Output : Puzzle Crack tp Code

Reversed string word wise

Solution in Python 3:

#join our telegram channel

a=' '.join(rev)

# Telegram @codewindow


codewindow is the best place for IT materials
materials IT for place best the is codewindow
Recent Posts

Leave a Comment

Your email address will not be published. Required fields are marked *