Swap Places (Variables & Output)

Read two words a b and print them swapped: b a.

Input: Two words separated by a space.

Output: The two words in reverse order.

Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • Keep each word in its own variable.

More Variables & Output practice