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?
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