Question #218757

You are given two strings as input. Write a program to print the given two strings in reverse order separated by "---".

Input

The first and second line of input are strings.

Explanation

In the example, the given strings are

Apple, Banana. So now we have to reverse the order of strings to Banana, Apple and add a separation line between the two strings.So the output should be


Banana

---

Apple




Expert's answer

string = "Apple  ---  Banana"
words = string.split()
words = list(reversed(words))
print("\n"  .join(words))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS