How can I switch between 2 characters?
<p>I am using python 2.7 and i'm trying to find a solution to this problem, 
when i get a string from a certain function 
i need to switch between the first and the last character.
for example if the string is "hello" it should return as "oellh"
slicing won't work and i cant just replace the characters like i will normally do because i dont know what the string is going to be or how long it would be. I thought about replacing between the character in position 0 with the character in position -1
but i cant find something that will enable me to do it. 
Does anyone have any suggestions?</p>
