+ 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.
6 Réponses
+ 13
JavaScript (1 line):
alert(prompt("Enter:").split(" ").reverse().join(" "));
+ 8
No love for low-level?
https://code.sololearn.com/c4Q0NkPcXXN2/?ref=app
+ 7
https://code.sololearn.com/caA7SY9VOb65/?ref=app
Python solution.
+ 3
I see your JS one-liner, and I raise you this:
print (' '.join(input().split()[::-1]))
I just love python :D
+ 2
Single statement + 2 ^^
https://code.sololearn.com/c13Qo0D7JzZC/?ref=app