how to reverse a string by writing one line of code