Exerpad
Exercise 5 · Chapter: String ManipulationRequired+50 XP

Join the Words

Read a number n, then read n words (one per line). Print all the words joined together with dashes - between them.

Example:

Input:

3
red
green
blue

Output:

red-green-blue
Need a hint?
3 available · costs 5 XP each
python

Output
Run your code to see the output here.