Hey there! This is a pretty basic question, i'm definitely a beginner in Python, but I'm wondering what exactly is it about this solution won't work (below) because the logic seems reasonable to me.
Basically in order to get a function that can reverse the a string ("hello" becomes "olleh") I wanted to break up the string, then put it into a loop that iterates through every letter and inserts it into an empty list. So as it loops through, it inserts 'h' into the first spot in the list, but then 'e' gets inserted and so on until 'o' is actually in the first spot and everything is effectively reversed.
my code wont loop through every letter though, it stops at 'h'. Is my code off or does the idea just not work?
Please help! Thank you so much!
rev = [ ]
a = list(text)
for l in a: