Assignment:
Print a string which has the reverse order
'Python love We. Science Data love We'
I tried this:
strg = We love Data Science. We love Python
words = strg.split(" ")
words.reverse()
new_strg = " ".join(words)
print(new_strg)
>>> Python love We Science. Data love We
But the answer isn't as expected because the . after Science is not at the proper place.
How to get the expected result?