+ 3

Challenge: reverse words in a string!

Possibile input: "Hi, how are you?" Output: "you? are how Hi," The string is inserted by an user.

30th Jul 2017, 2:47 PM
Andrea Simone Costa
Andrea Simone Costa - avatar
6 Respostas
+ 13
JavaScript (1 line): alert(prompt("Enter:").split(" ").reverse().join(" "));
30th Jul 2017, 3:09 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
30th Jul 2017, 2:52 PM
Hatsy Rei
Hatsy Rei - avatar
+ 7
https://code.sololearn.com/caA7SY9VOb65/?ref=app Python solution.
31st Jul 2017, 1:29 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
31st Jul 2017, 1:40 AM
Ekansh
+ 3
I see your JS one-liner, and I raise you this: print (' '.join(input().split()[::-1])) I just love python :D
30th Jul 2017, 4:31 PM
Bogdan Sass
Bogdan Sass - avatar
30th Jul 2017, 4:13 PM
Garikai
Garikai - avatar