Answers for "1.Reverse Words in a String"

0

reverse the words in a string python

string = 'hello people of india'
words = string.split()   #converts string into list
print(words[::-1])
Posted by: Guest on May-18-2021
0

reverse words in a given string

function reverse (word) {
    word = word.split('.').reverse().join('.')
    return word

}
word = 'i.like.this.program.very.much'
word = 'pqr.mno'
console.log(reverse(word))
Posted by: Guest on November-10-2020

Code answers related to "1.Reverse Words in a String"

Python Answers by Framework

Browse Popular Code Answers by Language