trying to reverse the order but not able to get the correct output. Please guide
You should not publish code solutions publicly.
The code you wrote here on reversal was right though, (check in google again how to reverse a list). The part that precedes it though using the cosine_similarity function, are you using it properly!
the thing in return statement, just put the reverse operator [::-1] and you will get the desired result.
Thank you