How to use a reverse function in python3?

I want to reverse a string without slicing it but only using reverse function. So how can I use reverse function to reverse a string?

Your Answer

string1="hithere" #using list l1=list(string1) l1.reverse() rev="".join(l1) print rev #using reversed rev='' rev=''.join(reversed(string1)) print rev #using index rev=string1[::-1] print rev

Python

Didn't get the answer.
Contact people of Talent-Python directly by clicking here